llvm-project/llvm/test/Instrumentation/AddressSanitizer
Marco Elver c47ec95531 [MemorySanitizer] Support memcpy.inline and memset.inline
Other sanitizers (ASan, TSan, see added tests) already handle
memcpy.inline and memset.inline by not relying on InstVisitor to turn
the intrinsics into calls. Only MSan instrumentation currently does not
support them due to missing InstVisitor callbacks.

Fix it by actually making InstVisitor handle Mem*InlineInst.

While the mem*.inline intrinsics promise no calls to external functions
as an optimization, for the sanitizers we need to break this guarantee
since access into the runtime is required either way, and performance
can no longer be guaranteed. All other cases, where generating a call is
incorrect, should instead use no_sanitize.

Fixes: https://github.com/llvm/llvm-project/issues/57048

Reviewed By: vitalybuka, dvyukov

Differential Revision: https://reviews.llvm.org/D131577
2022-08-11 10:43:49 +02:00
..
AMDGPU
X86 [ASan] Removed unused AddressSanitizerPass functional pass. 2022-03-01 00:41:29 +00:00
adaptive_global_redzones.ll Revert "[asan] Emit .size directive for global object size before redzone" 2022-04-21 16:21:17 -07:00
alloca-offset-lifetime.ll [ASan] Removed unused AddressSanitizerPass functional pass. 2022-03-01 00:41:29 +00:00
asan-detect-invalid-pointer-pair.ll [ASan] Removed unused AddressSanitizerPass functional pass. 2022-03-01 00:41:29 +00:00
asan-disable-sanitizer-instrumentation.ll [asan] Add support for disable_sanitizer_instrumentation attribute 2022-02-18 09:51:54 +01:00
asan-masked-load-store.ll [ASan] Removed unused AddressSanitizerPass functional pass. 2022-03-01 00:41:29 +00:00
asan-optimize-callbacks.ll
asan-stack-safety.ll [ASan] Use stack safety analysis to optimize allocas instrumentation. 2022-07-26 18:48:16 -07:00
asan-vs-gvn.ll
asan_address_space_attr.ll [ASan] Removed unused AddressSanitizerPass functional pass. 2022-03-01 00:41:29 +00:00
basic-msvc64.ll
basic.ll [AddressSanitizer] Allow prefixing memintrinsic calls in kernel mode 2022-03-31 11:14:42 +02:00
byref-args.ll [ASan] Removed unused AddressSanitizerPass functional pass. 2022-03-01 00:41:29 +00:00
byval-args.ll [ASan] Removed unused AddressSanitizerPass functional pass. 2022-03-01 00:41:29 +00:00
debug-info-alloca.ll
debug-info-global-var.ll Revert "[asan] Emit .size directive for global object size before redzone" 2022-04-21 16:21:17 -07:00
debug_info.ll
debug_info_noninstrumented_alloca.ll
debug_info_noninstrumented_alloca2.ll
do-not-instrument-globals-darwin.ll
do-not-instrument-globals-linux.ll
do-not-instrument-internal-globals.ll
do-not-instrument-netbsd-link_set.ll
do-not-instrument-profiling-globals.ll
do-not-instrument-promotable-allocas.ll
do-not-instrument-sanitizers.ll
do-not-touch-comdat-global.ll
do-not-touch-odr-global.ll
do-not-touch-threadlocal.ll
dynamic-shadow-darwin.ll
experiment-call.ll
experiment.ll
fake-stack.ll Revert "[IR] `IRBuilderBase::CreateAdd()`: short-circuit `x + 0` --> `x`" 2021-10-27 22:21:37 +03:00
force-dynamic-shadow.ll
freebsd.ll Add the FreeBSD AArch64 shadow offset to llvm 2022-07-19 09:58:07 -04:00
global_addrspace.ll
global_cstring_darwin.ll
global_lto_merge.ll
global_metadata.ll Delete 'llvm.asan.globals' for global metadata. 2022-06-27 14:40:40 -07:00
global_metadata_array.ll Delete 'llvm.asan.globals' for global metadata. 2022-06-27 14:40:40 -07:00
global_metadata_bitcasts.ll
global_metadata_darwin.ll
global_metadata_external_comdat.ll
global_metadata_windows.ll
global_with_comdat.ll Delete 'llvm.asan.globals' for global metadata. 2022-06-27 14:40:40 -07:00
hoist-argument-init-insts.ll
instrument-dynamic-allocas.ll
instrument-no-return.ll [ASan] Removed unused AddressSanitizerPass functional pass. 2022-03-01 00:41:29 +00:00
instrument-section-invalid-c-ident.ll
instrument-stack.ll
instrument_global.ll Delete 'llvm.asan.globals' for global metadata. 2022-06-27 14:40:40 -07:00
instrument_initializer_metadata.ll Delete 'llvm.asan.globals' for global metadata. 2022-06-27 14:40:40 -07:00
instrument_load_then_store.ll
instrumentation-with-call-threshold.ll
keep_going.ll
lifetime-throw.ll
lifetime-uar-uas.ll
lifetime.ll
local_alias.ll
local_stack_base.ll [ASan] Removed unused AddressSanitizerPass functional pass. 2022-03-01 00:41:29 +00:00
localescape.ll [Tests] Add elementtype attribute to indirect inline asm operands (NFC) 2022-01-06 14:23:51 +01:00
mem-intrinsics.ll [MemorySanitizer] Support memcpy.inline and memset.inline 2022-08-11 10:43:49 +02:00
module-flags.ll Extend the `uwtable` attribute with unwind table kind 2022-02-14 14:35:02 +00:00
musttail.ll
no-globals.ll [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
no_global_dtors.ll
odr-check-ignore.ll [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
ps4.ll [PS5] Set address sanitizer shadow offset 2022-06-16 11:28:30 -07:00
scale-offset.ll
stack-poisoning-and-lifetime-be.ll Revert "[IR] `IRBuilderBase::CreateAdd()`: short-circuit `x + 0` --> `x`" 2021-10-27 22:21:37 +03:00
stack-poisoning-and-lifetime.ll Revert "[IR] `IRBuilderBase::CreateAdd()`: short-circuit `x + 0` --> `x`" 2021-10-27 22:21:37 +03:00
stack-poisoning-byval-args.ll [ASan] Removed unused AddressSanitizerPass functional pass. 2022-03-01 00:41:29 +00:00
stack-poisoning.ll
stack_dynamic_alloca.ll
stack_layout.ll
str-nobuiltin.ll [ASan] Removed unused AddressSanitizerPass functional pass. 2022-03-01 00:41:29 +00:00
test64.ll
twice.ll [ASan] Removed unused AddressSanitizerPass functional pass. 2022-03-01 00:41:29 +00:00
ubsan.ll [ASan] Skip any instruction inserted by another instrumentation. 2022-06-07 11:17:07 +08:00
version-mismatch-check.ll
win-sorted-sections.ll
win-string-literal.ll Delete 'llvm.asan.globals' for global metadata. 2022-06-27 14:40:40 -07:00
with-ifunc.ll