llvm-capstone/compiler-rt
Dmitry Vyukov 27969c4e00 tsan: refactor trace tests
Instead of creating real threads for trace tests
create a new ThreadState in the main thread.
This makes the tests more unit-testy and will also
help with future trace tests that will need
more than 1 thread. Creating more than 1 real thread and
dispatching test actions across multiple threads in the
required deterministic order is painful.

This is resubmit of reverted D110546 with 2 changes:
1. The previous version patched ImitateTlsWrite to not
expect ThreadState to be allocated in TLS (the CHECK
failed for the fake test threads).
This added an ugly hack into production code and was still
logically wrong because we imitated write to the main
thread TLS/stack when we started the fake test thread
(which has nothing to do with the main thread TLS/stack).
This version uses ThreadType::Fiber instead of ThreadType::Regular
for the fake threads. This naturally makes ThreadStart skip
obtaining stack/tls and imitating writes to them.

2. This version still skips the tests on Darwin and PowerPC
to be on the safer side. Build bots reported failures for PowerPC
for the previous version.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D111156
2021-10-17 12:38:56 +02:00
..
cmake revert tsan part for investigation 2021-10-01 18:52:36 +00:00
docs Prepare Compiler-RT for GnuInstallDirs, matching libcxx, document all 2021-07-13 15:21:41 +00:00
include [InstrProfData] Bump the raw profile version to 8 2021-10-05 09:57:56 -07:00
lib tsan: refactor trace tests 2021-10-17 12:38:56 +02:00
test [ubsan] Remove REQUIRED from some TestCases 2021-10-15 10:20:34 -07:00
tools [GWP-ASan] Add inbuilt options parser. 2021-01-15 12:57:05 -08:00
unittests [test] Fix asan dynamic unit tests with per-target runtime dirs 2021-10-14 16:47:25 -04:00
utils [compiler-rt] NFC: Fix trivial typo 2021-09-04 14:12:58 +05:30
www [compiler-rt] Document that builtins is known to work on OpenBSD. 2021-09-07 04:25:12 -04:00
.clang-tidy NFC: .clang-tidy: Inherit configs from parents to improve maintainability 2021-06-08 08:25:59 -07:00
.gitignore
CMakeLists.txt [compiler-rt][test] Add shared_unwind requirement 2021-10-06 11:10:36 -07:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
README.txt

Compiler-RT
================================

This directory and its subdirectories contain source code for the compiler
support routines.

Compiler-RT is open source software. You may freely distribute it under the
terms of the license agreement found in LICENSE.txt.

================================