This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/16657] Lock elision breaks pthread_mutex_detroy
- From: "andi-bz at firstfloor dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 04 Apr 2014 22:31:52 +0000
- Subject: [Bug nptl/16657] Lock elision breaks pthread_mutex_detroy
- Auto-submitted: auto-generated
- References: <bug-16657-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=16657
--- Comment #10 from Andi Kleen <andi-bz at firstfloor dot org> ---
The reason I originally used DO_ELISION was that I was worried about two
parallel trylocks coming in here, and also corrupting the lock state.
But yes that fix may have been worse than the original problem, especially
since once the elision flag is set we don't care anymore.
So likely Andreas' original fix is the right one. Use FORCE_ELISION always.
Returning 0 in mutex_destroy would also work, but it could leave the mutex in
some awkward immediate state.
--
You are receiving this mail because:
You are on the CC list for the bug.