Package: binutils Version: 2.20.1-16 Severity: important
The following small example fails --- $ cat test.c static __thread int x, a[8]; int main() { return a[x++]++; } $ gcc -m32 -O1 -fPIC -pie test.c -o local $ ./local Segmentation fault --- I see the problem has been addressed via [1] (higher optimisation levels make these tls variables local-dynamic and indroduce the problem). I have confirmed the fix provided in [2/3] fixes this issue when applied against 2.20.1. I can make a dpatch from that if you would like. It would be really nice if this could make it into a stable update; unlike a BFD assert or something obvious like that, this is a real PITA to track down when it subtly corrupts your code :) Thanks, -i [1] https://bugs.launchpad.net/ubuntu/+source/binutils/+bug/663294 [2] http://sourceware.org/bugzilla/show_bug.cgi?id=12654 [3] http://sourceware.org/git/?p=binutils.git;a=commitdiff;h=394c20f3cb2295d278f2b25a59bd123bc310dfa1 -- System Information: Debian Release: 6.0.2 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable') 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) Shell: /bin/sh linked to /bin/dash Versions of packages binutils depends on: ii libc6 2.11.2-10 Embedded GNU C Library: Shared lib ii libgcc1 1:4.4.5-8 GCC support library ii libstdc++6 4.4.5-8 The GNU Standard C++ Library v3 ii zlib1g 1:1.2.3.4.dfsg-3 compression library - runtime binutils recommends no packages. Versions of packages binutils suggests: pn binutils-doc <none> (no description available) -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org