]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
elf: make tst-tls_tp_offset compare &thread_var to THREAD_SELF
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Sat, 11 Jan 2025 21:53:34 +0000 (22:53 +0100)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 12 Jan 2025 00:03:13 +0000 (01:03 +0100)
rather than pthread_self (), which in htl is not a pointer into dtv, but an
index.

elf/tst-tls_tp_offset.c

index e7c50663aafbc526c5e3a94a3bbb50827d128b37..a8faebc0eb9e6a04e426f2138db11f573c46797a 100644 (file)
@@ -37,7 +37,7 @@ do_test (void)
   ptrdiff_t block_offset = ((struct link_map *) _r_debug.r_map)->l_tls_offset;
   printf ("main program TLS block offset: %td\n", block_offset);
 
-  if ((uintptr_t) &thread_var < (uintptr_t) pthread_self ())
+  if ((uintptr_t) &thread_var < (uintptr_t) THREAD_SELF)
     {
       puts("TLS variables are located before struct pthread.");
       TEST_COMPARE (((intptr_t) __thread_pointer () - block_offset)