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

Dmitry Vyukov dvyukov at google.com
Wed Apr 3 17:53:29 PDT 2013



================
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;
 
----------------
We usually don't name variables LikeThis, we usually name them like_this.
And quite verbose on my taste. But feel free to ignore.

================
Comment at: lib/tsan/rtl/tsan_rtl.h:525
@@ -524,3 +524,2 @@
 
-  Mutex report_mtx;
   int nreported;
----------------
Leave this one as well. It detects deadlocks.
And it must the outer mutex, because it measures contention as well.



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



More information about the llvm-commits mailing list