Date: Mon, 4 Jun 2007 17:06:36 GMT From: Nathan Bates<nathanbates99@yahoo.com> To: freebsd-gnats-submit@FreeBSD.org Subject: i386/113338: GNU gcc __thread as class member Message-ID: <200706041706.l54H6a7e027778@www.freebsd.org> Resent-Message-ID: <200706041710.l54HA3JB084742@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 113338 >Category: i386 >Synopsis: GNU gcc __thread as class member >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-i386 >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jun 04 17:10:02 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Nathan Bates >Release: 6.2 >Organization: >Environment: FreeBSD amd64.intra.net 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 11:05:30 UTC 2007 root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 >Description: This pertains to GNU gcc Thread Local Storage. http://gcc.gnu.org/onlinedocs/gcc-3.4.6/gcc/Thread_002dLocal.html#Thread_002dLocal The storage class specifier "__thread" malfunctions if the thread-local variable is a C++ static class member. The variable apparently had a garbage value. The same code works ok on Linux. It will work ok on FreeBSD as an ordinary global variable (C extern linkage). I used g++ 3.4.6 on FreeBSD 6.2. >How-To-Repeat: Write pthreads code where two threads access a static class member in Thread Local Storage. >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200706041706.l54H6a7e027778>