diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2025-01-11 22:53:34 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2025-01-12 01:03:13 +0100 |
commit | 4ab62ce6053f731e36a02bdb1dc25441ed05836c (patch) | |
tree | 256576773aba7c5ee80db06cccf248c69dcb40b9 | |
parent | dbe3e6e0228fb25679280a913bf29a06f86bd967 (diff) | |
download | glibc-4ab62ce6053f731e36a02bdb1dc25441ed05836c.zip glibc-4ab62ce6053f731e36a02bdb1dc25441ed05836c.tar.gz glibc-4ab62ce6053f731e36a02bdb1dc25441ed05836c.tar.bz2 |
elf: make tst-tls_tp_offset compare &thread_var to THREAD_SELF
rather than pthread_self (), which in htl is not a pointer into dtv, but an
index.
-rw-r--r-- | elf/tst-tls_tp_offset.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/elf/tst-tls_tp_offset.c b/elf/tst-tls_tp_offset.c index e7c5066..a8faebc 100644 --- a/elf/tst-tls_tp_offset.c +++ b/elf/tst-tls_tp_offset.c @@ -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) |