This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/13184] rwlocks can go into dead lock
- From: "bugdal at aerifal dot cx" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Mon, 12 Sep 2011 21:32:43 +0000
- Subject: [Bug nptl/13184] rwlocks can go into dead lock
- Auto-submitted: auto-generated
- References: <bug-13184-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=13184
Rich Felker <bugdal at aerifal dot cx> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bugdal at aerifal dot cx
--- Comment #1 from Rich Felker <bugdal at aerifal dot cx> 2011-09-12 21:32:43 UTC ---
Please fix your test case; as is, it's invalid because it invokes undefined
behavior as soon as thread_main tries to read automatic storage from
spawn_threads which may have already returned. (I'm getting immediate assertion
failure in cache_get due to n containing nonsense.) You could fix this by
passing n by value (casting it to (void *)) rather than by reference.
I'm very interested in race condition bugs like this since I'm writing a
threads implementation and bugs in glibc/NPTL often end up either pointing to
similar bugs in my code, or lead to ideas for superior implementations. But I'm
not yet convince you've found a bug, since your test code is at least mildly
buggy...
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.