llvm-project/llvm/test/Instrumentation
Xun Li 7b4cc0961b [TSAN] Handle musttail call properly in EscapeEnumerator (and TSAN)
Call instructions with musttail tag must be optimized as a tailcall, otherwise could lead to incorrect program behavior.
When TSAN is instrumenting functions, it broke the contract by adding a call to the tsan exit function inbetween the musttail call and return instruction, and also inserted exception handling code.
This happend throguh EscapeEnumerator, which adds exception handling code and returns ret instructions as the place to insert instrumentation calls.
This becomes especially problematic for coroutines, because coroutines rely on tail calls to do symmetric transfers properly.
To fix this, this patch moves the location to insert instrumentation calls prior to the musttail call for ret instructions that are following musttail calls, and also does not handle exception for musttail calls.

Differential Revision: https://reviews.llvm.org/D87620
2020-09-15 15:20:05 -07:00
..
AddressSanitizer IR: Define byref parameter attribute 2020-07-20 10:23:09 -04:00
BoundsChecking [local-bounds] Ignore volatile operations 2020-05-05 23:08:08 -07:00
DataFlowSanitizer [DFSan] Add efficient fast16labels instrumentation mode. 2020-07-29 18:58:47 +00:00
HWAddressSanitizer hwasan: Emit the globals note even when globals are uninstrumented. 2020-08-13 16:33:22 -07:00
HeapProfiler [MemProf] Rename HeapProfiler to MemProfiler for consistency 2020-09-14 13:14:57 -07:00
InstrOrderFile Add a module pass for order file instrumentation 2019-02-28 20:13:38 +00:00
InstrProfiling [PGO] Use multiple comdat groups for COFF 2020-08-03 21:33:16 -07:00
MemorySanitizer [MSAN] Avoid dangling ActualFnStart when replacing instruction 2020-08-14 23:50:38 +00:00
PoisonChecking [PoisonCheker] Support for out of bounds operands on shifts + insert/extractelement 2019-07-09 19:26:12 +00:00
SanitizerCoverage [SanitizerCoverage] Use zeroext for cmp parameters on all targets 2020-08-12 18:38:12 +02:00
ThreadSanitizer [TSAN] Handle musttail call properly in EscapeEnumerator (and TSAN) 2020-09-15 15:20:05 -07:00
cgprofile.ll [LPM] Port CGProfilePass from NPM to LPM 2020-07-10 09:04:51 -07:00