This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/13502] SEGFAULT in fork() when pthread_atfork() was called from a library loaded/unloaded with dlopen/dlclose
- From: "carlos at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 03 Oct 2013 01:17:51 +0000
- Subject: [Bug libc/13502] SEGFAULT in fork() when pthread_atfork() was called from a library loaded/unloaded with dlopen/dlclose
- Auto-submitted: auto-generated
- References: <bug-13502-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=13502
Carlos O'Donell <carlos at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |carlos at redhat dot com
--- Comment #3 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Ondrej Bilka from comment #1)
> This problem cannot be solved without introducing new API.
>
> Problem here is lack of function that removes fork handler.
The removal of the handlers could be done automatically when the DSO is
unloaded.
Each dso has a unique __dso_handle inserted by the compiler which is used when
registering the handlers via pthread_atfork.
When the DSO is unloaded we could look through the registered handlers and
remove those that belong to the DSO being unloaded.
The only other robust alternatives are:
* mark the DSOs as unloadable e.g. -z nodelete.
* don't use pthread_atfork
--
You are receiving this mail because:
You are on the CC list for the bug.