[Bug malloc/19182] New: malloc deadlock between ptmalloc_lock_all and _int_new_arena
fweimer at redhat dot com
sourceware-bugzilla@sourceware.org
Wed Oct 28 19:29:00 GMT 2015
https://sourceware.org/bugzilla/show_bug.cgi?id=19182
Bug ID: 19182
Summary: malloc deadlock between ptmalloc_lock_all and
_int_new_arena
Product: glibc
Version: 2.23
Status: NEW
Severity: normal
Priority: P2
Component: malloc
Assignee: unassigned at sourceware dot org
Reporter: fweimer at redhat dot com
Target Milestone: ---
Flags: security-
ptmalloc_lock_all acquires list_lock, then arena locks. _int_new_arena
acquires an arena lock, then list_lock. This is a potential deadlock.
I think we can use a separate lock in ptmalloc_lock_all because this function
does not access any of the arena fields protected by list_lock.
There is also this bit which cannot be right.
/* Suspend the thread until the `atfork' handlers have completed.
By that time, the hooks will have been reset as well, so that
mALLOc() can be used again. */
(void) mutex_lock (&list_lock);
(void) mutex_unlock (&list_lock);
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list