[Bug malloc/19182] malloc deadlock between ptmalloc_lock_all and _int_new_arena
cvs-commit at gcc dot gnu.org
sourceware-bugzilla@sourceware.org
Mon Dec 21 16:30:00 GMT 2015
https://sourceware.org/bugzilla/show_bug.cgi?id=19182
--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 90c400bd4904b0240a148f0b357a5cbc36179239 (commit)
from b300455644e2945da05eb49d12d3a037f1408be1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=90c400bd4904b0240a148f0b357a5cbc36179239
commit 90c400bd4904b0240a148f0b357a5cbc36179239
Author: Florian Weimer <fweimer@redhat.com>
Date: Mon Dec 21 16:42:46 2015 +0100
malloc: Fix list_lock/arena lock deadlock [BZ #19182]
* malloc/arena.c (list_lock): Document lock ordering requirements.
(free_list_lock): New lock.
(ptmalloc_lock_all): Comment on free_list_lock.
(ptmalloc_unlock_all2): Reinitialize free_list_lock.
(detach_arena): Update comment. free_list_lock is now needed.
(_int_new_arena): Use free_list_lock around detach_arena call.
Acquire arena lock after list_lock. Add comment, including FIXME
about incorrect synchronization.
(get_free_list): Switch to free_list_lock.
(reused_arena): Acquire free_list_lock around detach_arena call
and attached threads counter update. Add two FIXMEs about
incorrect synchronization.
(arena_thread_freeres): Switch to free_list_lock.
* malloc/malloc.c (struct malloc_state): Update comments to
mention free_list_lock.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 19 +++++++++++++++
malloc/arena.c | 66 ++++++++++++++++++++++++++++++++++++++++++------------
malloc/malloc.c | 6 ++--
3 files changed, 73 insertions(+), 18 deletions(-)
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list