This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with TLS initialization
- From: Christian Parpart <cparpart at surakware dot net>
- To: Richard Henderson <rth at redhat dot com>,Manish Makkar <mmakkar at india dot hp dot com>
- Cc: gcc at gcc dot gnu dot org, gcc at gnu dot org, bug-gcc at gnu dot org
- Date: Thu, 27 Mar 2003 21:39:30 +0100
- Subject: Re: Problem with TLS initialization
- Organization: SurakWare
- References: <3E82DF6D.9790D85E@india.hp.com> <20030327191235.GE16845@redhat.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thursday 27 March 2003 8:12 pm, Richard inspired the electrons to say:
> On Thu, Mar 27, 2003 at 04:54:30PM +0530, Manish Makkar wrote:
> > # ./a.out
> > i= 8194, 1082469344
> > 8194, 8194
> > i= 16387, 1090857952
> > 16387, 16387
>
> Works For Me:
>
> [sherman:~] ./a.out
> i= 16386, 1
> 16386, 16386
> i= 32771, 1
> 32771, 32771
But even doesn't for me :(
cparpart at jupiter cparpart $ ./tls
pself = 16386, i = 1084849120
pself = 32771, i = 1093237728
pself = 32771, i = 32771
pself = 16386, i = 16386
As you can see, the initial value is not set to 1, also, you are not able
to set the __thread i to a different value inside main(). Here I get a
SEGFAULT. Why?
> This is with glibc-2.3.1-38 on RH AS2.1. I don't have
> anything earlier handy to test against.
This is with glibc-2.3.2 on Gentoo Linux (1.4). I know this problem has been
earlier, too.
> I suspect whatever problem you're having is with your
> glibc installation.
I suspect whatever the problem really is, it's something _inside_ glibc, since
I didn't change anything there.
Regards,
Christian Parpart.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+g2GFPpa2GmDVhK0RAhlIAKCKcJ5mLO0VttRHgnKTFNL2OuUxVACeO8NU
alBtNaTmZKg54yg0nOvax5E=
=GeZ0
-----END PGP SIGNATURE-----