[PATCH] Add ASan hooks to BumpPtrAllocator
Alexey Samsonov
vonosmas at gmail.com
Thu May 14 14:21:25 PDT 2015
================
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);
----------------
kcc wrote:
> 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
In fact, it's worth defining this macro in llvm/Support/Compiler.h, similar to what we do for MSan interface function `__msan_allocated_memory`
http://reviews.llvm.org/D9757
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list