[PATCH] [Tsan] Do not intercept non-FreeBSD functions on FreeBSD

Dmitry Vyukov dvyukov at google.com
Thu Oct 23 21:58:09 PDT 2014


================
Comment at: lib/tsan/rtl/tsan_interceptors.cc:108
@@ -107,1 +107,3 @@
 
+#define TSAN_INTERCEPT_MMAP64 SANITIZER_LINUX
+#define TSAN_INTERCEPT_MEMALIGN SANITIZER_LINUX
----------------
What's the point in defining these TSAN_INTERCEPT_MMAP64 macros? Looks like an unnecessary level of indirection. They are used exactly once, and now I need to modify 3 places in stead of 2 when working with an interceptor.
Please remove TSAN_INTERCEPT_MMAP64 macros and use the condition (e.g. SANITIZER_LINUX) directly. Looks like a net win to me.

http://reviews.llvm.org/D5858






More information about the llvm-commits mailing list