[PATCH] Add ASan hooks to BumpPtrAllocator
Kostya Serebryany
kcc at google.com
Thu May 14 14:00:01 PDT 2015
<grumble>
the annotations are provided for exactly this purpose,
but still asan handles allocation much better if it fully controls malloc.
</grumble>
================
Comment at: include/llvm/Support/Allocator.h:229
@@ +228,3 @@
+ // Similarly, tell ASan about this space.
+#if LLVM_ADDRESS_SANITIZER_BUILD
+ ASAN_UNPOISON_MEMORY_REGION(AlignedPtr, Size);
----------------
I don't like so many ifdefs.
Maybe like this?
#if LLVM_ADDRESS_SANITIZER_BUILD
# include ...
#else
#define ASAN_POISON_MEMORY_REGION(a,b) /*empty*/
#endif
http://reviews.llvm.org/D9757
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list