[compiler-rt] r212529 - [tsan] fix deadlock detector's interoperation with java locks (https://code.google.com/p/thread-sanitizer/issues/detail?id=67)
Kostya Serebryany
kcc at google.com
Tue Jul 8 06:16:04 PDT 2014
Author: kcc
Date: Tue Jul 8 08:16:03 2014
New Revision: 212529
URL: http://llvm.org/viewvc/llvm-project?rev=212529&view=rev
Log:
[tsan] fix deadlock detector's interoperation with java locks (https://code.google.com/p/thread-sanitizer/issues/detail?id=67)
Modified:
compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_mutex.cc
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_mutex.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_mutex.cc?rev=212529&r1=212528&r2=212529&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_mutex.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_mutex.cc Tue Jul 8 08:16:03 2014
@@ -172,7 +172,7 @@ void MutexLock(ThreadState *thr, uptr pc
}
s->recursion += rec;
thr->mset.Add(s->GetId(), true, thr->fast_state.epoch());
- if (flags()->detect_deadlocks && s->recursion == 1) {
+ if (flags()->detect_deadlocks && (s->recursion - rec) == 0) {
Callback cb(thr, pc);
if (!try_lock)
ctx->dd->MutexBeforeLock(&cb, &s->dd, true);
More information about the llvm-commits
mailing list