[PATCH] asan: do not instrument direct inbounds accesses to stack variables
dvyukov at google.com
Wed Mar 4 01:38:58 PST 2015
I've applied clang-format.
Renamed s/inbounds/safe/. Comment above the function explains the meaning of safe.
Regarding compilation speed. On top of removing instrumentation and reducing binary size, it also speedups compilation (less stuff for backed to deal with). I've tested on llvm's largest source file lib/Target/X86/X86ISelLowering.cpp.
current without asan -O0:
(I cross-checked that the new compiler has the same performance)
current -fsanitize=address -O0
new -fsanitize=address -O0
current -fsanitize=address -O1
new -fsanitize=address -O1
current -fsanitize=address -O2
new -fsanitize=address -O2
Object file size:
w/o asan: 1228800
current with asan: 3658480 (+197.73%)
new with asan: 3444760 (-5.84%)
Amount of instrumentation (since it is just an object file, I grepped for "callq"):
w/o asan: 8235
current with asan: 37342
new with asan: 33706 (-12.5%)
More information about the llvm-commits