commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] elf: make tst-tls_tp_offset compare &thread_var to THREAD_SELF


From: Samuel Thibault
Subject: [PATCH] elf: make tst-tls_tp_offset compare &thread_var to THREAD_SELF
Date: Sat, 11 Jan 2025 23:48:33 +0100

rather than pthread_self (), which in htl is not a pointer into dtv, but an
index.
---
 elf/tst-tls_tp_offset.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/elf/tst-tls_tp_offset.c b/elf/tst-tls_tp_offset.c
index e7c50663aa..a8faebc0eb 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)
-- 
2.45.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]