[PATCH] D27654: Stop intercepting mallinfo and mallopt on FreeBSD

Kostya Serebryany via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 12 11:16:08 PST 2016


kcc added a comment.

Please add a test. 
I wonder if it's possible to have fewer ifdefs?



================
Comment at: lib/asan/asan_malloc_linux.cc:117
 
+#if !SANITIZER_FREEBSD
 // We avoid including malloc.h for portability reasons.
----------------
Not like this. 
Please add 
#define SANITIZER_INTERCEPT_MALLOPT_AND_MALLINFO  (!SANITIZER_FREEBSD)
 to lib/sanitizer_common/sanitizer_platform_interceptors.h
then use it here. 


https://reviews.llvm.org/D27654





More information about the llvm-commits mailing list