[compiler-rt] r207218 - tsan: allow to suppress all reports
Dmitry Vyukov
dvyukov at google.com
Fri Apr 25 03:09:19 PDT 2014
Author: dvyukov
Date: Fri Apr 25 05:09:18 2014
New Revision: 207218
URL: http://llvm.org/viewvc/llvm-project?rev=207218&view=rev
Log:
tsan: allow to suppress all reports
Fixes issue https://code.google.com/p/thread-sanitizer/issues/detail?id=45
Modified:
compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.h
compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_mutex.cc
compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_thread.cc
compiler-rt/trunk/lib/tsan/rtl/tsan_suppressions.cc
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.h?rev=207218&r1=207217&r2=207218&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.h (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.h Fri Apr 25 05:09:18 2014
@@ -629,7 +629,7 @@ void ForkChildAfter(ThreadState *thr, up
void ReportRace(ThreadState *thr);
bool OutputReport(Context *ctx,
const ScopedReport &srep,
- const ReportStack *suppress_stack1 = 0,
+ const ReportStack *suppress_stack1,
const ReportStack *suppress_stack2 = 0,
const ReportLocation *suppress_loc = 0);
bool IsFiredSuppression(Context *ctx,
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=207218&r1=207217&r2=207218&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_mutex.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_mutex.cc Fri Apr 25 05:09:18 2014
@@ -59,7 +59,7 @@ static void ReportMutexMisuse(ThreadStat
trace.ObtainCurrent(thr, pc);
rep.AddStack(&trace);
rep.AddLocation(addr, 1);
- OutputReport(ctx, rep);
+ OutputReport(ctx, rep, rep.GetReport()->stacks[0]);
}
void MutexCreate(ThreadState *thr, uptr pc, uptr addr,
@@ -115,7 +115,7 @@ void MutexDestroy(ThreadState *thr, uptr
RestoreStack(last.tid(), last.epoch(), &trace, 0);
rep.AddStack(&trace);
rep.AddLocation(s->addr, 1);
- OutputReport(ctx, rep);
+ OutputReport(ctx, rep, rep.GetReport()->stacks[0]);
}
thr->mset.Remove(s->GetId());
DestroyAndFree(s);
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_thread.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_thread.cc?rev=207218&r1=207217&r2=207218&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_thread.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_thread.cc Fri Apr 25 05:09:18 2014
@@ -207,7 +207,7 @@ void ThreadFinalize(ThreadState *thr) {
ScopedReport rep(ReportTypeThreadLeak);
rep.AddThread(leaks[i].tctx);
rep.SetCount(leaks[i].count);
- OutputReport(ctx, rep);
+ OutputReport(ctx, rep, rep.GetReport()->threads[0]->stack);
}
#endif
}
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_suppressions.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_suppressions.cc?rev=207218&r1=207217&r2=207218&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_suppressions.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_suppressions.cc Fri Apr 25 05:09:18 2014
@@ -103,6 +103,14 @@ SuppressionType conv(ReportType typ) {
return SuppressionThread;
else if (typ == ReportTypeMutexDestroyLocked)
return SuppressionMutex;
+ else if (typ == ReportTypeMutexDoubleLock)
+ return SuppressionMutex;
+ else if (typ == ReportTypeMutexBadUnlock)
+ return SuppressionMutex;
+ else if (typ == ReportTypeMutexBadReadLock)
+ return SuppressionMutex;
+ else if (typ == ReportTypeMutexBadReadUnlock)
+ return SuppressionMutex;
else if (typ == ReportTypeSignalUnsafe)
return SuppressionSignal;
else if (typ == ReportTypeErrnoInSignal)
More information about the llvm-commits
mailing list