[PATCH] asan: do not instrument direct inbounds accesses to stack variables
Dmitry Vyukov
dvyukov at google.com
Tue Feb 17 22:49:13 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++;
----------------
kcc wrote:
> mega cool.
> Let's put it under a flag e.g. asan-opt-stack-inbounds (off by default) and play with it more.
Is it possible to make it work correctly? I am lost in all possible llvm predicates and their meaning. I don't understand how "int x[10]; x[12] = 1" can be an "in bounds constant offset".
http://reviews.llvm.org/D7583
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list