1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/test/Instrumentation/ThreadSanitizer
Fangrui Song b451f3588d [sanitizer] Place module_ctor/module_dtor in llvm.used
This removes an abuse of ELF linker behaviors while keeping Mach-O/COFF linker
behaviors unchanged.

ELF: when module_ctor is in a comdat, this patch removes reliance on a linker
abuse (an SHT_INIT_ARRAY in a section group retains the whole group) by using
SHF_GNU_RETAIN. No linker behavior difference when module_ctor is not in a comdat.

Mach-O: module_ctor gets `N_NO_DEAD_STRIP`. No linker behavior difference
because module_ctor is already referenced by a `S_MOD_INIT_FUNC_POINTERS`
section (GC root).

PE/COFF: no-op. SanitizerCoverage already appends module_ctor to `llvm.used`.
Other sanitizers: llvm.used for local linkage is not implemented in
`TargetLoweringObjectFileCOFF::emitLinkerDirectives` (once implemented or
switched to a non-local linkage, COFF can use module_ctor in comdat (i.e.
generalize ELF-specific rL301586)).

There is no object file size difference.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D106246
2021-07-21 14:03:26 -07:00
..
atomic-non-integer.ll
atomic.ll [TSAN] Honor failure memory orders in AtomicCAS 2021-05-13 01:07:22 -07:00
capture.ll
do-not-instrument-memory-access.ll [test][TSan] Fix tests under NPM 2020-09-18 11:37:55 -07:00
eh.ll
no_sanitize_thread.ll
read_before_write.ll [TSan] Add option for emitting compound read-write instrumentation 2020-07-17 10:24:20 +02:00
read_from_global.ll
sanitize-thread-no-checking.ll
str-nobuiltin.ll
tsan_address_space_attr.ll
tsan_basic.ll [sanitizer] Place module_ctor/module_dtor in llvm.used 2021-07-21 14:03:26 -07:00
tsan_musttail.ll [TSAN] Handle musttail call properly in EscapeEnumerator (and TSAN) 2020-09-15 15:20:05 -07:00
tsan-vs-gvn.ll [BasicAA] Rename deprecated -basicaa to -basic-aa 2020-06-26 20:41:37 -07:00
unaligned.ll
volatile.ll [TSAN] Add optional support for distinguishing volatiles 2020-04-22 17:27:09 +02:00
vptr_read.ll
vptr_update.ll