This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem with TLS initialization


-----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-----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]