[Bug malloc/19431] Deadlock between fflush, getdelim, and fork

fweimer at redhat dot com sourceware-bugzilla@sourceware.org
Tue Jan 5 17:57:00 GMT 2016


https://sourceware.org/bugzilla/show_bug.cgi?id=19431

--- Comment #2 from Florian Weimer <fweimer at redhat dot com> ---
(In reply to prumpf from comment #1)
> Would that lose us the ability to use external malloc() implementations
> based on our default malloc()?

No, not directly.  It will not fix the bug for external mallocs, but they might
not even have these bugs, or support malloc after multi-threaded fork at all
(which is a glibc extension).

> I'm not happy with the rather complicated fix at bug 16742, which introduces
> atfork handler priorities, but IIRC providing an API for external malloc()s
> rather than explicitly calling into the malloc code from within fork was
> part of the reason.  I'm not objecting to your solution at all, but I think
> we should make it clear in the documentation if the internal malloc()
> implementation becomes the only malloc() it is safe to use during fork()s.

I think this is entirely up to the interposed malloc implementation and what
they want to support.

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


More information about the Glibc-bugs mailing list