[PATCH] Introduce a common mutex to prevent mixing reports from different sanitizers.

Alexey Samsonov samsonov at google.com
Thu Apr 4 05:21:45 PDT 2013



================
Comment at: lib/tsan/rtl/tsan_rtl.h:525
@@ -524,3 +524,2 @@
 
-  Mutex report_mtx;
   int nreported;
----------------
Dmitry Vyukov wrote:
> Leave this one as well. It detects deadlocks.
> And it must the outer mutex, because it measures contention as well.
> 
Assume you've meant "must be the outer mutex"

================
Comment at: lib/sanitizer_common/sanitizer_common.h:114
@@ -112,1 +113,3 @@
+// Can be used to prevent mixing error reports from different sanitizers.
+extern StaticSpinMutex CommonSanitizerReportMutex;
 
----------------
Dmitry Vyukov wrote:
> We usually don't name variables LikeThis, we usually name them like_this.
> And quite verbose on my taste. But feel free to ignore.
Yeah, well, we've already have SanitizerToolName here...


http://llvm-reviews.chandlerc.com/D618



More information about the llvm-commits mailing list