This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/19826] invalid pointer returned from __tls_get_addr with static linking
- From: "schwab at linux-m68k dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 15 Sep 2016 14:52:18 +0000
- Subject: [Bug libc/19826] invalid pointer returned from __tls_get_addr with static linking
- Auto-submitted: auto-generated
- References: <bug-19826-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=19826
--- Comment #2 from Andreas Schwab <schwab@linux-m68k.org> ---
Plain C testcase:
#include <stdio.h>
#include <pthread.h>
__thread int __attribute__ ((tls_model ("global-dynamic"))) x = 10;
void *
th (void *p)
{
printf ("x = %d\n", x);
return 0;
}
int
main (void)
{
printf ("x = %d\n", x);
pthread_t t;
pthread_create (&t, 0, th, 0);
pthread_join (t, 0);
}
--
You are receiving this mail because:
You are on the CC list for the bug.