[ASAN] Don't inline when -asan-max-inline-poisoning-size=0
authorRoy Sundahl <rsundahl@apple.com>
Tue, 18 Oct 2022 18:52:52 +0000 (14:52 -0400)
committerRoy Sundahl <rsundahl@apple.com>
Mon, 24 Oct 2022 21:17:59 +0000 (14:17 -0700)
commit0c35b6165ccc4fc3c5c1286236a02ea6f7894d00
treec7282792dd6effc3b42194c04b08f18d40edf8b2
parentc977251ef6fee3f7045039832331e8aab1e0a1b2
[ASAN] Don't inline when -asan-max-inline-poisoning-size=0

When -asan-max-inline-poisoning-size=0, all shadow memory access should be
outlined (through asan calls). This was not occuring when partial poisoning
was required on the right side of a variable's redzone. This diff contains
the changes necessary to implement and utilize  __asan_set_shadow_01() through
__asan_set_shadow_07(). The change is necessary for the full abstraction of
the asan implementation and will enable experimentation with alternate strategies.

Differential Revision: https://reviews.llvm.org/D136197
compiler-rt/lib/asan/asan_interface.inc
compiler-rt/lib/asan/asan_interface_internal.h
compiler-rt/lib/asan/asan_poisoning.cpp
compiler-rt/lib/asan/asan_rtl.cpp
compiler-rt/lib/asan/tests/asan_internal_interface_test.cpp
compiler-rt/test/asan/TestCases/set_shadow_test.c
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
llvm/test/Instrumentation/AddressSanitizer/calls-only.ll [new file with mode: 0644]