[PATCH] asan: do not instrument direct inbounds accesses to stack variables
Kostya Serebryany
kcc at google.com
Tue Feb 17 17:34:43 PST 2015
================
Comment at: lib/Transforms/Instrumentation/AddressSanitizer.cpp:882
@@ +881,3 @@
+ // A direct inbounds access to a stack variable is always valid.
+ if (isa<AllocaInst>(Addr->stripInBoundsConstantOffsets())) {
+ NumOptimizedAccessesToStackVar++;
----------------
mega cool.
Let's put it under a flag e.g. asan-opt-stack-inbounds (off by default) and play with it more.
================
Comment at: lib/Transforms/Instrumentation/AddressSanitizer.cpp:886
@@ +885,3 @@
+ }
+/*
+ This does not give the desired result.
----------------
remove this then?
http://reviews.llvm.org/D7583
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list