diff options
author | 2024-07-17 14:06:25 +0200 | |
---|---|---|
committer | 2024-07-17 14:14:21 +0200 | |
commit | 0e75c4a4634f44ad24a65fda01f571781ac79d5f (patch) | |
tree | c1ade85f2a3db2f7a217463fcdfcb3dbf3487320 /htl | |
parent | LoongArch: Add cfi instructions for _dl_tlsdesc_dynamic (diff) | |
download | glibc-0e75c4a4634f44ad24a65fda01f571781ac79d5f.tar.gz glibc-0e75c4a4634f44ad24a65fda01f571781ac79d5f.tar.bz2 glibc-0e75c4a4634f44ad24a65fda01f571781ac79d5f.zip |
hurd: Fix pthread_self() without libpthread
5476f8cd2e68 ("htl: move pthread_self info libc.") moved the htl
pthread_self() function from libpthread to libc, replacing the previous libc
stub that just returns 0. And 53da64d1cf36 ("htl: Initialize ___pthread_self
early") added initialization code which is needed before being able to
call pthread_self. It is currently in libpthread, and thus never called
before programs can call pthread_self from libc, which then segfaults
when accessing _pthread_self()->thread.
This moves the initialization to libc itself, as initialized variables, so
pthread_self can always be called fine.
Diffstat (limited to 'htl')
-rw-r--r-- | htl/Versions | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/htl/Versions b/htl/Versions index e1524117a0..69b79b4f1b 100644 --- a/htl/Versions +++ b/htl/Versions @@ -38,6 +38,7 @@ libc { __pthread_cleanup_stack; __pthread_total; ___pthread_self; + __pthread_init_thread; } } |