[Bug 8211] pthread_atfork handlers not removed during dlclose

bugzilla at busybox.net bugzilla at busybox.net
Tue Jan 5 07:48:36 UTC 2016


https://bugs.busybox.net/show_bug.cgi?id=8211

--- Comment #4 from Leonid <lly.dev at gmail.com> ---
The problem is simple:

1) LT.old hasn't fork.h & __unregister_atfork() at all.

2) in LT.new __register_atfork()/__unregister_atfork() functions resides in
libpthread and not accessible from libc directly.

So, my suggestion, since rework LT.old & LT.new is a large separate task,
simply to enable pthread_atfork handlers cleanup for NPTL only.

i.e. first hunk of your patch should be changed to:

@@ -42,6 +42,9 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <atomic.h>
+#if defined __UCLIBC_HAS_THREADS__ && defined __UCLIBC_HAS_THREADS_NATIVE__
+# include <fork.h>
+#endif

 #include <bits/uClibc_mutex.h>
 __UCLIBC_MUTEX_EXTERN(__atexit_lock) attribute_hidden;

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the uClibc-cvs mailing list