This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/10282] New: free() race in mcheck hooks
- From: "pasky at suse dot cz" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 14 Jun 2009 23:04:16 -0000
- Subject: [Bug libc/10282] New: free() race in mcheck hooks
- Reply-to: sourceware-bugzilla at sourceware dot org
In multi-threaded programs, we are seeing a lot of free() aborts with
MALLOC_CHECK_ turned on (our default settings) with glibc-2.10 on
openSUSE:Factory. A simple testcase is not easy to make, but I suppose
brute-forcing parallel free()s agressively enough would make it show up.
I think this locking change is the cause. In realloc_check(), the mutex is
explicitly taken when calling mem2chunk_check(), and mem2chunk_check appears to
be accessing other parts of the arena which I guess is unsafe without the mutex.
Shouldn't the mutex be held during mem2chunk_check()?
--
Summary: free() race in mcheck hooks
Product: glibc
Version: 2.11
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: pasky at suse dot cz
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=10282
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.