This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug nptl/13184] rwlocks can go into dead lock


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]