1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/test/Instrumentation
Reid Kleckner 4642e9c80c [asan] Make ASan compatible with linker dead stripping on Windows
Summary:
This is similar to what was done for Darwin in rL264645 /
http://reviews.llvm.org/D16737, but it uses COFF COMDATs to achive the
same result instead of relying on new custom linker features.

As on MachO, this creates one metadata global per instrumented global.
The metadata global is placed in the custom .ASAN$GL section, which the
ASan runtime will iterate over during initialization. There are no other
references to the metadata, so normal linker dead stripping would
discard it. However, the metadata is put in a COMDAT group with the
instrumented global, so that it will be discarded if and only if the
instrumented global is discarded.

I didn't update the ASan ABI version check since this doesn't affect
non-Windows platforms, and the WinASan ABI isn't really stable yet.

Implementing this for ELF will require extending LLVM IR and MC a bit so
that we can use non-COMDAT section groups.

Reviewers: pcc, kcc, mehdi_amini, kubabrecka

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D26770

llvm-svn: 287576
2016-11-21 20:40:37 +00:00
..
AddressSanitizer [asan] Make ASan compatible with linker dead stripping on Windows 2016-11-21 20:40:37 +00:00
BoundsChecking Add a bunch of CHECK missing colons in tests. NFC. 2015-03-14 01:43:57 +00:00
DataFlowSanitizer [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
EfficiencySanitizer [EfficiencySanitizer] Using '$' instead of '#' for struct counter name 2016-09-22 08:33:06 +00:00
InstrProfiling [InstrProfiling] Mark __llvm_profile_instrument_target last parameter as i32 zeroext if appropriate. 2016-11-21 11:57:19 +00:00
MemorySanitizer [AVX-512] Add AVX-512 vector shift intrinsics to memory santitizer. 2016-11-15 16:27:33 +00:00
SanitizerCoverage [sancov] Name the global containing the main source file name 2016-11-16 16:50:43 +00:00
ThreadSanitizer [tsan] Add support for C++ exceptions into TSan (call __tsan_func_exit during unwinding), LLVM part 2016-11-14 21:41:13 +00:00