[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#203434: marked as done (libc6: accessing thread-local storage causes SIGSEGV)



Your message dated Sat, 18 Feb 2006 23:22:43 +0100
with message-id <20060218222243.GA13130@bode.aurel32.net>
and subject line libc6: accessing thread-local storage causes SIGSEGV
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: libc6
Version: 2.3.1-17
Severity: normal

gcc-3.3.1 understands a syntax for declaring C global variables with
thread-local storage.  Programs using this extension compile and link
fine, but fail at run time.  As soon as a program accesses or takes
the address of any piece of thread-local storage, the program fails
with a segmentation fault (SIGSEGV).

To reproduce the problem, compile the following simple program.  No
special command line flags are needed:

	__thread int x;

	int main()
	{
		x = 0;
		return 0;
	}

Run the program, and observe that it dies with SIGSEGV.  Taking the
address of a variable with thread-local storage exhibits the same
problem.

My understanding is that while GCC has to generate the right code,
thread-local storage also requires support from the linker, run-time
loader, and C library.  I'm reporting this against libc6 on the
assumption that either libc itself or the loader (/lib/ld-2.3.1.so) is
at fault.  It's possible, though, that the problem is elsewhere.

For the record, I'm also using binutils 2.14.90.0.5-0.1 and gcc 3.3-2,
all on Debian unstable.

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux brawnix 2.4.18-bf2.4 #1 Son Apr 14 09:53:28 CEST 2002 i686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8

Versions of packages libc6 depends on:
ii  libdb1-compat                 2.1.3-7    The Berkeley database routines [gl

-- no debconf information



--- End Message ---
--- Begin Message ---
Version: 2.3.5-1

Hi,

Since version 2.3.5, the glibc is built with TLS support on all 
platforms which support it, unless it is explicitely disabled.

Therefore the code you have given in example will work correctly on the
following platforms: alpha, amd64, i386, ia64, powerpc, s390, sparc.

On arm, m68k, hppa, mips and mipsel, you will get the following message:
error: thread-local storage not supported for this target

You will still get a segfault on the Hurd platform because tls support
is explicitely disabled on this platform, due to broken support.

As Hurd is still under development, I think we could consider this bug
fixed. I am closing it with this mail, please feel free to reopen it if
you not agree.

Bye,
Aurelien

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net

--- End Message ---

Reply to: