Debian Bug report logs - #672705
[swh-plugins] LADSPA plugins shouldn't call setlocale()

version graph

Package: swh-plugins; Maintainer for swh-plugins is Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>; Source for swh-plugins is src:swh-plugins (PTS, buildd, popcon).

Reported by: Daniel Gibson <gibson@Mathematik.Uni-Marburg.de>

Date: Sun, 13 May 2012 00:15:02 UTC

Severity: important

Tags: patch

Found in version swh-plugins/0.4.15+1-4

Fixed in version swh-plugins/0.4.15+1-7

Done: Alessio Treglia <alessio@debian.org>

Bug is archived. No further changes may be made.

Forwarded to 'steve.harris@garlik.com'

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian QA Group <packages@qa.debian.org>:
Bug#672705; Package swh-plugins. (Sun, 13 May 2012 00:15:05 GMT) (full text, mbox, link).


Acknowledgement sent to Daniel Gibson <gibson@Mathematik.Uni-Marburg.de>:
New Bug report received and forwarded. Copy sent to Debian QA Group <packages@qa.debian.org>. (Sun, 13 May 2012 00:15:05 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Daniel Gibson <gibson@Mathematik.Uni-Marburg.de>
To: submit@bugs.debian.org
Subject: [swh-plugins] LADSPA plugins shouldn't call setlocale()
Date: Sun, 13 May 2012 01:53:18 +0200
[Message part 1 (text/plain, inline)]
Package: swh-plugins
Version: 0.4.15+1-4
Severity: important
Tags: patch

--- Please enter the report below this line. ---

All LADSPA plugins from this package call
  setlocale (LC_ALL, "");
which is a bad idea because it screws up the locale setting of any
application using the plugin.
This can lead to really hard to find bugs with applications that depend
on the standard "C" locale, e.g. to parse floats with scanf/strtod/...
(a locale that uses ',' instead of '.' as a float radix will break things).

This is even harder to track down when using a LADSPA plugin in your
~/.asoundrc (I hunted down strange behaviour[1] in the "dhewm3" doom3
port from doom3 -> openal-soft -> portaudio -> libasound2 -> LADSPA
plugins.. this took me several weekends).
Using *any* LADSPA plugin (even if it's from a non-broken package like
the cmt package) can trigger that bug, as the plugin is usally
identified by its id or label in the .asoundrc, which implies that any
LADSPA plugin installed on the system will be loaded to check if the
id/label matches.

I've attached a patch that removes all calls to setlocale(). If an
application wants to use the localized plugin names/descriptions it
should call setlocale() itself (and I guess localized applications do
that anyway).

BTW: The blop package has the same bug, #672704


Cheers,
- Daniel

[1] http://imgur.com/8Ld0C + crashes when loading maps

--- System information. ---
Architecture: amd64
Kernel:       Linux 2.6.39-bpo.2-amd64

Debian Release: 6.0.4
  500 stable          security.debian.org
  500 stable          ftp.de.debian.org
  500 stable          dl.google.com
  500 stable          deb.opera.com
  100 squeeze-backports backports.debian.org

--- Package information. ---
Depends         (Version) | Installed
=========================-+-===========
libc6          (>= 2.2.5) | 2.11.3-2
libfftw3-3                | 3.2.2-1


Package's Recommends field is empty.

Package's Suggests field is empty.



[swh-plugins-nosetlocale.patch (text/x-patch, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian QA Group <packages@qa.debian.org>:
Bug#672705; Package swh-plugins. (Thu, 27 Dec 2012 16:54:11 GMT) (full text, mbox, link).


Acknowledgement sent to Alessio Treglia <alessio@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian QA Group <packages@qa.debian.org>. (Thu, 27 Dec 2012 16:54:12 GMT) (full text, mbox, link).


Message #10 received at 672705@bugs.debian.org (full text, mbox, reply):

From: Alessio Treglia <alessio@debian.org>
To: steve.harris@garlik.com
Cc: 672705@bugs.debian.org
Subject: [PATCH] swh-plugins: Don't call setlocale()
Date: Thu, 27 Dec 2012 16:41:21 +0000
[Message part 1 (text/plain, inline)]
forwarded 672705 'steve.harris@garlik.com'
tags 672705 pending
thanks

Hi Steve,

How are you? I hope you're doing well!
I've been taking over the Debian's swh-plugins package and I'd like to
bring the attached patch up to your attention, it comes from the
Debian bug#672705 [1].
Shortly, it avoids plugin to call setlocale() since it screws up the
locale settings of any host application using them.

Thanks for considering, and cheers!

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=672705

-- 
Alessio Treglia          | www.alessiotreglia.com
Debian Developer         | alessio@debian.org
Ubuntu Core Developer    | quadrispro@ubuntu.com
0416 0004 A827 6E40 BB98 90FB E8A4 8AE5 311D 765A
[04-nosetlocale.diff (application/octet-stream, attachment)]

Set Bug forwarded-to-address to ''steve.harris@garlik.com''. Request was from Alessio Treglia <alessio@debian.org> to control@bugs.debian.org. (Thu, 27 Dec 2012 16:54:23 GMT) (full text, mbox, link).


Added tag(s) pending. Request was from Alessio Treglia <alessio@debian.org> to control@bugs.debian.org. (Thu, 27 Dec 2012 16:54:23 GMT) (full text, mbox, link).


Reply sent to Alessio Treglia <alessio@debian.org>:
You have taken responsibility. (Thu, 27 Dec 2012 17:21:11 GMT) (full text, mbox, link).


Notification sent to Daniel Gibson <gibson@Mathematik.Uni-Marburg.de>:
Bug acknowledged by developer. (Thu, 27 Dec 2012 17:21:11 GMT) (full text, mbox, link).


Message #19 received at 672705-close@bugs.debian.org (full text, mbox, reply):

From: Alessio Treglia <alessio@debian.org>
To: 672705-close@bugs.debian.org
Subject: Bug#672705: fixed in swh-plugins 0.4.15+1-7
Date: Thu, 27 Dec 2012 17:17:43 +0000
Source: swh-plugins
Source-Version: 0.4.15+1-7

We believe that the bug you reported is fixed in the latest version of
swh-plugins, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 672705@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Alessio Treglia <alessio@debian.org> (supplier of updated swh-plugins package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Thu, 27 Dec 2012 16:46:16 +0000
Source: swh-plugins
Binary: swh-plugins
Architecture: source amd64
Version: 0.4.15+1-7
Distribution: unstable
Urgency: low
Maintainer: Debian Multimedia Maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org>
Changed-By: Alessio Treglia <alessio@debian.org>
Description: 
 swh-plugins - Steve Harris's LADSPA plugins
Closes: 622162 629263 672705
Changes: 
 swh-plugins (0.4.15+1-7) unstable; urgency=low
 .
   * Adopting this. Thanks to Patrick Matthäi for the
     great job. (Closes: #622162)
   * Bump debhelper requirement.
   * Turn it into dh short form + dh_autoreconf.
   * Enable git-buildpackage support.
   * Plugins shouldn't call setlocale() as it could screw up the locale
     settings of any application using them. Thanks to Daniel Gibson
     for the patch. (Closes: #672705)
   * Fix buffer overrun that causes explosions on little endian 64bit
     platforms. (Closes: #629263)
   * Don't remove po/*.gmo files in order to preserve upstream's original
     sources tree.
   * debian/patches/01-dont-use-march.diff:
     - Don't patch configure, it's going to be regenerated by autoreconf.
   * Refresh other patches.
Checksums-Sha1: 
 a41ebc75cbc3378cdab761797611e750873e2d2c 2077 swh-plugins_0.4.15+1-7.dsc
 20f794a261e116cb0d0199e6bab3fa085c458755 150618 swh-plugins_0.4.15+1-7.debian.tar.gz
 14d7eac01d286f02824986e07f57e69d4080921a 689054 swh-plugins_0.4.15+1-7_amd64.deb
Checksums-Sha256: 
 9e5d378c4c98ce54c7d5b7a41e34d7021099c7ed79e6af0d5bc013f0fa06828a 2077 swh-plugins_0.4.15+1-7.dsc
 068ca11bf2c85274a73fc96ebb72e72f40ac687a3bc65071360f566519a61c18 150618 swh-plugins_0.4.15+1-7.debian.tar.gz
 80b0de09aaf10644bce7c4a712ab5082fe88f7eeb524680c408d1f50d507a79e 689054 swh-plugins_0.4.15+1-7_amd64.deb
Files: 
 79f02181b89389a9369329420272d767 2077 sound optional swh-plugins_0.4.15+1-7.dsc
 901e36b7871a2685ca30a444933a848c 150618 sound optional swh-plugins_0.4.15+1-7.debian.tar.gz
 5c3f52c9bb82b583241e5bf2650e2d18 689054 sound optional swh-plugins_0.4.15+1-7_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBAgAGBQJQ3IAfAAoJEOikiuUxHXZaOgcP/ib/Q/JfKdal0S3ePp7HQwBh
1ujWmmITuDt22nC1ePPVgwBsBss+ol0ucn8V6caXt8k9m54cK9UK1T1VECPYNAGk
6FFILOdbiG1m1j+9V2uswd/7sKuaXArD/pTOtxTbU9B+KmQQh6Zm5czqFRQBY7E2
D2J43URWV8V1nCLQokTOBPi+ksTv+CAOpQCDyh1FqAk7xJZgBEErjOdcGB01iIhD
YS1O6V3PkSXsgpPkohOQ94RBLXUoD3mcFECD85kwyrOGpFm11GInjtuX/Yx7dCuY
UIWQ0X8AGpVMxW4eTzGcP/iT17RXHyWh2mzliGiLFhXV5uYS5WsoQkdiiRkjo6XC
Ix2Sxo9Eh2RJswHPxUrgF9UjbyE+NXF+bLQnzqlTMx5ne3cpXArV54C4ianFzyro
gOwbzkXaGv9aQ/ELZpCf9DLD9SqsKMV5S7luJpuYuV+B/d3qkaUFkkg6LVHZgF8l
x7vUq1cI+2BOWvJk3mHWHSDSFaRSu9hZs6MALLgdeDcdSBwK6DPIEjTW2J0ZzUot
KjLgfRK5qF8k+6Ces1CDoKZFgWQxpzvGHGFV5nBfk/5lDUvaZwEG5cU8mGHyuo3d
/5gy8IydzKhhoK+yA+WPLY43ZbnZtCG6f4hlTTGuyT6ADbZdkAdRHKju8+bwFemO
RDgxI1rFVPTIlYlZOoRA
=Gp1e
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 03 Jun 2013 07:32:41 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Oct 19 05:35:40 2025; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.