freebsd-src/lib/libthr/tests
Kyle Evans 4b202f4faf libthr: allow very early atfork registration
LSan wants to be able to register atfork handlers at __lsan_init time,
which can happen either at the first intercepted function call or in a
.preinit_array function.  Both of these end up being very early in rtld
and executed with the bind lock held, which ends up causing problems
when we go to _libpthread_init().

Instead of requiring libpthread to be initialized, just insert the new
atfork handler straight into the list if it's not ready yet.  The
critical section and locking should not be necessary if we're really
executing this early, as there won't be any threads to contend with.

Reviewed by:	kib (earlier version), markj
Differential Revision:	https://reviews.freebsd.org/D47349
2024-11-13 19:33:44 -06:00
..
dlopen Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
atfork_test.c libthr: allow very early atfork registration 2024-11-13 19:33:44 -06:00
Makefile libthr: add some tests for pthread_atfork() handling 2024-11-13 19:33:37 -06:00
Makefile.depend
pthread_sigqueue_test.c
umtx_op_test.c typo: Fix side -> size since it matters to the meaning... 2024-06-04 10:59:01 -06:00