]> sourceware.org Git - glibc.git/commit
hurd: Fix pthread_self() without libpthread
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Wed, 17 Jul 2024 12:06:25 +0000 (14:06 +0200)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Wed, 17 Jul 2024 12:14:21 +0000 (14:14 +0200)
commit0e75c4a4634f44ad24a65fda01f571781ac79d5f
treec1ade85f2a3db2f7a217463fcdfcb3dbf3487320
parent43224b1379d60b1ad98d29ef3d7905d55f828a9f
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.
htl/Versions
sysdeps/mach/hurd/htl/pt-pthread_self.c
sysdeps/mach/hurd/htl/pt-sysdep.c
sysdeps/mach/hurd/htl/pt-sysdep.h
This page took 0.042392 seconds and 5 git commands to generate.