[PATCH] call __asan_load_cxx_array_cookie when loading array cookie in asan mode.
Richard Smith
richard at metafoo.co.uk
Thu Aug 28 17:31:57 PDT 2014
================
Comment at: lib/CodeGen/ItaniumCXXABI.cpp:1513-1514
@@ +1512,4 @@
+ return CGF.Builder.CreateLoad(numElementsPtr);
+ // In asan mode emit a function call instead of a regular load and let the
+ // run-time deal with it.
+ llvm::FunctionType *FTy =
----------------
Please extend this comment to point out why we need to do this.
================
Comment at: lib/CodeGen/ItaniumCXXABI.cpp:1516
@@ +1515,3 @@
+ llvm::FunctionType *FTy =
+ llvm::FunctionType::get(CGF.SizeTy, CGF.SizeTy->getPointerTo(AS), false);
+ llvm::Constant *F =
----------------
I don't think we can support address spaces other than 0 like this (the ASan runtime function will only accept address space 0 pointers). How does ASan deal with non-zero address spaces?
http://reviews.llvm.org/D5111
More information about the cfe-commits
mailing list