[compiler-rt] r210353 - tsan: disable reporting of mutex misuses in Go
Dmitry Vyukov
dvyukov at google.com
Fri Jun 6 10:23:28 PDT 2014
Author: dvyukov
Date: Fri Jun 6 12:23:27 2014
New Revision: 210353
URL: http://llvm.org/viewvc/llvm-project?rev=210353&view=rev
Log:
tsan: disable reporting of mutex misuses in Go
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=210353&r1=210352&r2=210353&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_mutex.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_mutex.cc Fri Jun 6 12:23:27 2014
@@ -52,6 +52,10 @@ void DDMutexInit(ThreadState *thr, uptr
static void ReportMutexMisuse(ThreadState *thr, uptr pc, ReportType typ,
uptr addr, u64 mid) {
+ // In Go, these misuses are either impossible, or detected by std lib,
+ // or false positives (e.g. unlock in a different thread).
+ if (kGoMode)
+ return;
ThreadRegistryLock l(ctx->thread_registry);
ScopedReport rep(typ);
rep.AddMutex(mid);
More information about the llvm-commits
mailing list