1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/test/Instrumentation/AddressSanitizer
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
..
AMDGPU [ASan][AMDGPU] Make shadow offset match X86 on Linux 2021-07-09 07:48:03 +05:30
X86
adaptive_global_redzones.ll [sanitizer] Reduce redzone size for small size global objects 2021-05-19 19:18:50 -07:00
alloca-offset-lifetime.ll
asan_address_space_attr.ll
asan-detect-invalid-pointer-pair.ll
asan-masked-load-store.ll
asan-vs-gvn.ll
basic-msvc64.ll
basic.ll [sanitizer] Place module_ctor/module_dtor in llvm.used 2021-07-21 14:03:26 -07:00
byref-args.ll
byval-args.ll
debug_info_noninstrumented_alloca2.ll
debug_info_noninstrumented_alloca.ll
debug_info.ll [sanitizer] Remove numeric values from -asan-use-after-return flag. (NFC) 2021-06-11 15:14:51 -07:00
debug-info-alloca.ll Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
debug-info-global-var.ll [sanitizer] Reduce redzone size for small size global objects 2021-05-19 19:18:50 -07:00
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 [sanitizer] Remove numeric values from -asan-use-after-return flag. (NFC) 2021-06-11 15:14:51 -07:00
force-dynamic-shadow.ll
freebsd.ll
global_addrspace.ll
global_cstring_darwin.ll [sanitizer] Reduce redzone size for small size global objects 2021-05-19 19:18:50 -07:00
global_lto_merge.ll [sanitizer] Reduce redzone size for small size global objects 2021-05-19 19:18:50 -07:00
global_metadata_array.ll Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
global_metadata_bitcasts.ll
global_metadata_darwin.ll
global_metadata_external_comdat.ll
global_metadata_windows.ll [IR] Rename comdat noduplicates to comdat nodeduplicate 2021-07-20 12:47:10 -07:00
global_metadata.ll Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
global_with_comdat.ll Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
hoist-argument-init-insts.ll Remove (unneeded) '-asan-use-after-return' from hoist-argument-init-insts.ll. 2021-05-14 11:55:23 -07:00
instrument_global.ll [sanitizer] Place module_ctor/module_dtor in llvm.used 2021-07-21 14:03:26 -07:00
instrument_initializer_metadata.ll
instrument_load_then_store.ll
instrument-dynamic-allocas.ll Reapply "OpaquePtr: Turn inalloca into a type attribute" 2021-03-29 08:55:30 -04:00
instrument-no-return.ll
instrument-section-invalid-c-ident.ll
instrument-stack.ll
instrumentation-with-call-threshold.ll
keep_going.ll
lifetime-throw.ll [sanitizer] Remove numeric values from -asan-use-after-return flag. (NFC) 2021-06-11 15:14:51 -07:00
lifetime-uar-uas.ll LLVM Detailed IR tests for introduction of flag -fsanitize-address-detect-stack-use-after-return-mode. 2021-05-25 16:17:39 -07:00
lifetime.ll [sanitizer] Remove numeric values from -asan-use-after-return flag. (NFC) 2021-06-11 15:14:51 -07:00
local_alias.ll [sanitizer] Reduce redzone size for small size global objects 2021-05-19 19:18:50 -07:00
local_stack_base.ll
localescape.ll LLVM Detailed IR tests for introduction of flag -fsanitize-address-detect-stack-use-after-return-mode. 2021-05-25 16:17:39 -07:00
module-flags.ll [IR][sanitizer] Add module flag "frame-pointer" and set it for cc1 -mframe-pointer={non-leaf,all} 2021-04-22 18:07:30 -07:00
musttail.ll
no_global_dtors.ll
no-globals.ll [IR][sanitizer] Set nounwind on module ctor/dtor, additionally set uwtable if -fasynchronous-unwind-tables 2021-04-21 15:58:20 -07:00
odr-check-ignore.ll [sanitizer] Reduce redzone size for small size global objects 2021-05-19 19:18:50 -07:00
ps4.ll
scale-offset.ll
stack_dynamic_alloca.ll Update and improve compiler-rt tests for -mllvm -asan_use_after_return=(never|[runtime]|always). 2021-06-08 14:39:06 -07:00
stack_layout.ll
stack-poisoning-and-lifetime-be.ll
stack-poisoning-and-lifetime.ll
stack-poisoning-byval-args.ll
stack-poisoning.ll Update and improve compiler-rt tests for -mllvm -asan_use_after_return=(never|[runtime]|always). 2021-06-08 14:39:06 -07:00
str-nobuiltin.ll
test64.ll
twice.ll
ubsan.ll
version-mismatch-check.ll
win-sorted-sections.ll
win-string-literal.ll [sanitizer] Reduce redzone size for small size global objects 2021-05-19 19:18:50 -07:00
with-ifunc.ll