[PATCH] D14424: [tsan] Enable new/delete C++ interceptors for OS X

Alexander Potapenko via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 10 17:00:58 PST 2015


glider added inline comments.

================
Comment at: compiler-rt/trunk/lib/tsan/rtl/tsan_new_delete.cc:15
@@ -14,2 +14,3 @@
 #include "sanitizer_common/sanitizer_internal_defs.h"
+#include "interception/interception.h"
 #include "tsan_interceptors.h"
----------------
Please keep the includes list sorted (clang-format might be your friend - don't remember if we use it in TSan)

================
Comment at: compiler-rt/trunk/lib/tsan/rtl/tsan_new_delete.cc:27
@@ +26,3 @@
+#if SANITIZER_MAC
+#define __libc_malloc REAL(malloc)
+#define __libc_free REAL(free)
----------------
I actually don't think it's a good idea to rename REAL(malloc) into __libc_malloc to match the Linux name. 
I also vaguely remember that it might not be 100% correct to use the default libc allocator for TSan. Dima, didn't we want to change this?


Repository:
  rL LLVM

http://reviews.llvm.org/D14424





More information about the llvm-commits mailing list