This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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]

[Bug libc/19826] invalid pointer returned from __tls_get_addr with static linking


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.

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