From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22147 invoked by alias); 15 Jun 2009 22:37:55 -0000 Received: (qmail 22102 invoked by uid 48); 15 Jun 2009 22:37:45 -0000 Date: Mon, 15 Jun 2009 22:37:00 -0000 Message-ID: <20090615223745.22101.qmail@sourceware.org> From: "pasky at suse dot cz" To: glibc-bugs@sources.redhat.com In-Reply-To: <20090614230415.10282.pasky@suse.cz> References: <20090614230415.10282.pasky@suse.cz> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug libc/10282] free() race in mcheck hooks X-Bugzilla-Reason: CC Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2009-06/txt/msg00067.txt.bz2 ------- Additional Comments From pasky at suse dot cz 2009-06-15 22:37 ------- Created an attachment (id=4001) --> (http://sourceware.org/bugzilla/attachment.cgi?id=4001&action=view) deadlock-free proposed patch Revised patch; unfortunately, the ATOMIC_FASTBINS stuff makes the code fairly ugly now... getting rid of the #if 0 bit might help a little. Without this patch, this crashes in few tens of seconds on my four-core when run with MALLOC_CHECK_=3: /* compile with -fopenmp */ #include #include int main(void) { #pragma omp parallel num_threads(256) while (1) { void *ptr = malloc(rand() % 65536); usleep((rand() % 100) * 100); free(ptr); usleep((rand() % 100) * 100); } return 0; } -- What |Removed |Added ---------------------------------------------------------------------------- Attachment #3996 is|0 |1 obsolete| | 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.