llvm-project/llvm/test/Instrumentation/ThreadSanitizer
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
..
atomic-non-integer.ll [tsan][test] Change -tsan to -passes=tsan 2022-04-21 20:44:56 -07:00
atomic.ll [tsan][test] Change -tsan to -passes=tsan 2022-04-21 20:44:56 -07:00
capture.ll [tsan][test] Change -tsan to -passes=tsan 2022-04-21 20:44:56 -07:00
debug_calls.ll [tsan][test] Change -tsan to -passes=tsan 2022-04-21 20:44:56 -07:00
do-not-instrument-memory-access.ll
eh.ll [tsan][test] Change -tsan to -passes=tsan 2022-04-21 20:44:56 -07:00
missing_dbg.ll [ThreadSanitizer] Add fallback DebugLocation for instrumentation calls 2022-05-05 15:21:35 +02:00
no_sanitize_thread.ll [tsan][test] Change -tsan to -passes=tsan 2022-04-21 20:44:56 -07:00
personality.ll [PS5] Use __gxx_personality_v0 for TSan 2022-06-14 10:39:34 -07:00
read_before_write.ll [tsan][test] Change -tsan to -passes=tsan 2022-04-21 20:44:56 -07:00
read_from_global.ll [tsan][test] Change -tsan to -passes=tsan 2022-04-21 20:44:56 -07:00
sanitize-thread-no-checking.ll [tsan][test] Change -tsan to -passes=tsan 2022-04-21 20:44:56 -07:00
str-nobuiltin.ll [tsan][test] Change -tsan to -passes=tsan 2022-04-21 20:44:56 -07:00
tsan-vs-gvn.ll [tsan][test] Change -tsan to -passes=tsan 2022-04-21 20:44:56 -07:00
tsan_address_space_attr.ll [tsan][test] Change -tsan to -passes=tsan 2022-04-21 20:44:56 -07:00
tsan_basic.ll [MemorySanitizer] Support memcpy.inline and memset.inline 2022-08-11 10:43:49 +02:00
tsan_musttail.ll [tsan][test] Change -tsan to -passes=tsan 2022-04-21 20:44:56 -07:00
unaligned.ll [tsan][test] Change -tsan to -passes=tsan 2022-04-21 20:44:56 -07:00
volatile.ll [tsan][test] Change -tsan to -passes=tsan 2022-04-21 20:44:56 -07:00
vptr_read.ll [tsan][test] Change -tsan to -passes=tsan 2022-04-21 20:44:56 -07:00
vptr_update.ll [tsan][test] Change -tsan to -passes=tsan 2022-04-21 20:44:56 -07:00