[compiler-rt] 03372e7 - tsan: remove unbalanced mutex unlock
Dmitry Vyukov via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 2 05:17:18 PDT 2021
Author: Dmitry Vyukov
Date: 2021-08-02T14:17:12+02:00
New Revision: 03372e72d30294fe67012cd5cc0f069ce25cce3e
URL: https://github.com/llvm/llvm-project/commit/03372e72d30294fe67012cd5cc0f069ce25cce3e
DIFF: https://github.com/llvm/llvm-project/commit/03372e72d30294fe67012cd5cc0f069ce25cce3e.diff
LOG: tsan: remove unbalanced mutex unlock
The mutex is now unlocked by the scoped Lock object.
Differential Revision: https://reviews.llvm.org/D107266
Added:
Modified:
compiler-rt/lib/tsan/rtl/tsan_rtl_mutex.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl_mutex.cpp b/compiler-rt/lib/tsan/rtl/tsan_rtl_mutex.cpp
index 342d65cf43d4..c199a2ec7ad2 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_rtl_mutex.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_rtl_mutex.cpp
@@ -204,7 +204,6 @@ void MutexPostLock(ThreadState *thr, uptr pc, uptr addr, u32 flagz, int rec) {
ctx->dd->MutexAfterLock(&cb, &s->dd, true, flagz & MutexFlagTryLock);
}
mid = s->GetId();
- s->mtx.Unlock();
}
if (report_double_lock)
ReportMutexMisuse(thr, pc, ReportTypeMutexDoubleLock, addr, mid);
More information about the llvm-commits
mailing list