[PATCH] D14424: [tsan] Enable new/delete C++ interceptors for OS X
Dmitry Vyukov via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 11 01:37:35 PST 2015
dvyukov added inline comments.
================
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)
----------------
glider wrote:
> 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?
It is OK to call into system malloc in tsan.
It would be great to get rid of system malloc calls in tsan, though. But that's definitely more work than these 2 defines.
Tsan uses system malloc for historical reasons. Initially we did not have internal allocator (nor sanitizer allocator at all), and using custom slab allocators proved to be too painful. Current internal allocator can eat huge amounts of memory, though.
Repository:
rL LLVM
http://reviews.llvm.org/D14424
More information about the llvm-commits
mailing list