Subject: sox: LADSPA plugins segfault
Package: sox
Version: 14.3.1-1+b1
Severity: normal
Tags: patch

*** Please type your report below this line ***
sox will segfault when trying to use the LADSPA effect with any plugin.

An example command with the ‘cmt’ package installed:

  sox input.wav output.wav ladspa cmt delay_1s

Produces the following backtrace:

  #0  0x00007ffff794183c in ?? () from /usr/lib/libltdl.so.7
  #1  0x00007ffff7942c28 in ?? () from /usr/lib/libltdl.so.7
  #2  0x00007ffff7941096 in ?? () from /usr/lib/libltdl.so.7
  #3  0x00007ffff79424d3 in ?? () from /usr/lib/libltdl.so.7
  #4  0x00007ffff7942af8 in lt_dlopenadvise () from /usr/lib/libltdl.so.7
  #5  0x00007ffff7942bb9 in lt_dlopenext () from /usr/lib/libltdl.so.7
  #6  0x00007ffff7b7bbc2 in ?? () from /usr/lib/libsox.so.1
  #7  0x00007ffff7b70e4d in sox_effect_options () from /usr/lib/libsox.so.1
  #8  0x0000000000407cce in ?? ()
  #9  0x000000000040984c in ?? ()
  #10 0x00007ffff5e27c8d in __libc_start_main () from /lib/libc.so.6
  #11 0x0000000000402be9 in ?? ()
  #12 0x00007fffffffe208 in ?? ()
  #13 0x000000000000001c in ?? ()
  #14 0x0000000000000008 in ?? ()
  #15 0x00007fffffffe515 in ?? ()
  #16 0x00007fffffffe522 in ?? ()
  #17 0x00007fffffffe539 in ?? ()
  #18 0x00007fffffffe556 in ?? ()
  #19 0x00007fffffffe55b in ?? ()
  #20 0x00007fffffffe55e in ?? ()
  #21 0x00007fffffffe565 in ?? ()
  #22 0x00007fffffffe569 in ?? ()
  #23 0x0000000000000000 in ?? ()

A discussion¹ of this appeared on the SoX-users mailing list in July 2010,
where member ‘bl4’ discovered sox was not calling the libltdl lt_dlinit
function and provided a patch.

I have applied the patch and sox no longer segfaults with LADSPA plugins.

¹http://sourceforge.net/mailarchive/message.php?msg_id=25680681

-- System Information:
Debian Release: 6.0.5
  APT prefers stable
  APT policy: (900, 'stable'), (500, 'stable-updates')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages sox depends on:
ii  libc6                  2.11.3-3          Embedded GNU C Library: Shared lib
ii  libgomp1               4.4.5-8           GCC OpenMP (GOMP) support library
ii  libgsm1                1.0.13-3          Shared libraries for GSM speech co
ii  libltdl7               2.2.6b-2          A system independent dlopen wrappe
ii  libmagic1              5.04-5+squeeze2   File type determination library us
ii  libopencore-amrnb0     0.1.2-1           Adaptive Multi Rate speech codec -
ii  libopencore-amrwb0     0.1.2-1           Adaptive Multi-Rate - Wideband spe
ii  libpng12-0             1.2.44-1+squeeze4 PNG library - runtime
ii  libsndfile1            1.0.21-3+squeeze1 Library for reading/writing audio 
ii  libsox-fmt-alsa        14.3.1-1+b1       SoX alsa format I/O library
ii  libsox-fmt-ao          14.3.1-1+b1       SoX Libao format I/O library
ii  libsox-fmt-base        14.3.1-1+b1       Minimal set of SoX format librarie
ii  libsox-fmt-oss         14.3.1-1+b1       SoX OSS format I/O library
ii  libsox-fmt-pulse       14.3.1-1+b1       SoX PulseAudio format I/O library
ii  libsox1b               14.3.1-1+b1       SoX library of audio effects and p
ii  zlib1g                 1:1.2.3.4.dfsg-3  compression library - runtime

sox recommends no packages.

Versions of packages sox suggests:
ii  libsox-fmt-all               14.3.1-1+b1 All SoX format libraries

-- no debconf information

-- 
Gerald Turner   Email: gtur...@unzane.com   JID: gtur...@unzane.com
GPG: 0xFA8CD6D5  21D9 B2E8 7FE7 F19E 5F7D  4D0C 3FA0 810F FA8C D6D5
--- sox-14.3.1/src/ladspa.c.orig	2010-07-03 14:01:30.000000000 +0200
+++ sox-14.3.1/src/ladspa.c	2010-07-04 13:42:46.000000000 +0200
@@ -103,6 +103,7 @@
   path = getenv("LADSPA_PATH");
   if (path == NULL)
     path = LADSPA_PATH;
+  lt_dlinit();
   lt_dlsetsearchpath(path);
   if ((l_st->lth = lt_dlopenext(l_st->name)) == NULL) {
     lsx_fail("could not open LADSPA plugin %s", l_st->name);

Attachment: pgpFjLRpALXa3.pgp
Description: PGP signature

Reply via email to