llvm-project/compiler-rt/include
Julian Lettner 26e0fb88a3 [TSan] Support initialize/finalize hooks in dynamic libraries
Make TSan runtime initialization and finalization hooks work
even if these hooks are not built in the main executable.  When these
hooks are defined in another library that is not directly linked against
the TSan runtime (e.g., Swift runtime) we cannot rely on the "strong-def
overriding weak-def" mechanics and have to look them up via `dlsym()`.

Let's also define hooks that are easier to use from C-only code:
```
extern "C" void __tsan_on_initialize();
extern "C" int __tsan_on_finalize(int failed);
```
For now, these will call through to the old hooks.  Eventually, we want
to adopt the new hooks downstream and remove the old ones.

This is part of the effort to support Swift Tasks (async/await and
actors) in TSan.

rdar://74256720

Reviewed By: vitalybuka, delcypher

Differential Revision: https://reviews.llvm.org/D98810
2021-03-24 12:38:39 -07:00
..
fuzzer Fix typo: `char` should be `TS` 2021-03-18 11:00:07 -07:00
profile [PGO] Fix two issues in PGOMemOPSizeOpt. 2021-03-11 09:53:05 -08:00
sanitizer [TSan] Support initialize/finalize hooks in dynamic libraries 2021-03-24 12:38:39 -07:00
xray Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt [MemProf] Decouple memprof build from COMPILER_RT_BUILD_SANITIZERS 2020-10-26 13:52:50 -07:00