[tsan] fix deadlock detector's interoperation with java locks (https://code.google.com/p/thread-sanitizer/issues/detail?id=67)
llvm-svn: 212529
This commit is contained in:
parent
324ad956e0
commit
3d570b960e
|
@ -172,7 +172,7 @@ void MutexLock(ThreadState *thr, uptr pc, uptr addr, int rec, bool try_lock) {
|
|||
}
|
||||
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);
|
||||
|
|
Loading…
Reference in New Issue