| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[TSan] Make tests work with internal shell This patch makes all tsan tests work with the internal shell on Darwin. Tests were using various features not supported by the internal shell, mainly subshells and not using env to set environment variables. This patch also fixes one of the dynamiclib substitutions to not use a subshell. Reviewers: ndrewh, DanBlackwell, fmayer, vitalybuka Reviewed By: DanBlackwell Pull Request: https://github.com/llvm/llvm-project/pull/168544 | 8 个月前 | |
Fix more compiler-rt tests after #149015. | 1 年前 | |
Rename config.host_os to config.target_os. config.host_os is derived from CMAKE_SYSTEM_NAME which specifies the target. See: https://cmake.org/cmake/help/latest/variable/CMAKE_SYSTEM_NAME.html To reduce confusion, rename it to config.target_os. The variable name config.target_os was already being used by the Orc tests. Rename it to config.orc_test_target_os with a FIXME to remove. Reviewers: JDevlieghere, MaskRay Reviewed By: MaskRay Pull Request: https://github.com/llvm/llvm-project/pull/149015 | 1 年前 | |
Fix more compiler-rt tests after #149015. | 1 年前 | |
Rename config.host_os to config.target_os. config.host_os is derived from CMAKE_SYSTEM_NAME which specifies the target. See: https://cmake.org/cmake/help/latest/variable/CMAKE_SYSTEM_NAME.html To reduce confusion, rename it to config.target_os. The variable name config.target_os was already being used by the Orc tests. Rename it to config.orc_test_target_os with a FIXME to remove. Reviewers: JDevlieghere, MaskRay Reviewed By: MaskRay Pull Request: https://github.com/llvm/llvm-project/pull/149015 | 1 年前 | |
[compiler-rt] Cleanup use of COMPILER_RT_INCLUDE_TESTS (#98246) 1. Move checks into parent test/CMakeLists.txt 2. COMPILER_RT_INCLUDE_TESTS disable both lit and gtests. Before it was very inconsistent between sanitizers. | 2 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
tsan: declare annotations in test.h We already declare subset of annotations in test.h. But some are duplicated and declared in tests. Move all annotation declarations to test.h. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D102152 | 5 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
[TSan][Darwin] Prevent inlining of functions in tests Prevent inlining of functions so we can FileCheck the generated stack traces. | 4 年前 | |
[TSan][Darwin] Prevent inlining of functions in tests Prevent inlining of functions so we can FileCheck the generated stack traces. | 4 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
tsan: don't print __tsan_atomic* functions in report stacks Currently __tsan_atomic* functions do FuncEntry/Exit using caller PC and then use current PC (pointing to __tsan_atomic* itself) during memory access handling. As the result the top function in reports involving atomics is __tsan_atomic* and the next frame points to user code. Remove FuncEntry/Exit in atomic functions and use caller PC during memory access handling. This removes __tsan_atomic* from the top of report stacks, so that they point right to user code. The motivation for this is performance. Some atomic operations are very hot (mostly loads), so removing FuncEntry/Exit is beneficial. This also reduces thread trace consumption (1 event instead of 3). __tsan_atomic* at the top of the stack is not necessary and does not add any new information. We already say "atomic write of size 4", "__tsan_atomic32_store" does not add anything new. It also makes reports consistent between atomic and non-atomic accesses. For normal accesses we say "previous write" and point to user code; for atomics we say "previous atomic write" and now also point to user code. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D106966 | 4 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
tsan: add another test for atomics Add a test where atomic-release happens while another thread spins calling load-acquire. This can expose some interesting interleavings of release and acquire. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D107055 | 4 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
tsan: don't print __tsan_atomic* functions in report stacks Currently __tsan_atomic* functions do FuncEntry/Exit using caller PC and then use current PC (pointing to __tsan_atomic* itself) during memory access handling. As the result the top function in reports involving atomics is __tsan_atomic* and the next frame points to user code. Remove FuncEntry/Exit in atomic functions and use caller PC during memory access handling. This removes __tsan_atomic* from the top of report stacks, so that they point right to user code. The motivation for this is performance. Some atomic operations are very hot (mostly loads), so removing FuncEntry/Exit is beneficial. This also reduces thread trace consumption (1 event instead of 3). __tsan_atomic* at the top of the stack is not necessary and does not add any new information. We already say "atomic write of size 4", "__tsan_atomic32_store" does not add anything new. It also makes reports consistent between atomic and non-atomic accesses. For normal accesses we say "previous write" and point to user code; for atomics we say "previous atomic write" and now also point to user code. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D106966 | 4 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
tsan: add more micro benchmarks 1. Add a set of micro benchmarks for memory accesses, mem* functions and unaligned accesses. 2. Add support for multiple benchmarks in a single binary (or it would require 12 new benchmark binaries). 3. Remove the "clock growth" machinery, it affects the current tsan runtime by increasing size of all vector clocks, but this won't be relevant for the new tsan runtime. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D106961 | 4 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
tsan: optimize DenseSlabAlloc If lots of threads do lots of malloc/free and they overflow per-pthread DenseSlabAlloc cache, it causes lots of contention: 31.97% race.old race.old [.] __sanitizer::StaticSpinMutex::LockSlow 17.61% race.old race.old [.] __tsan_read4 10.77% race.old race.old [.] __tsan::SlotLock Optimize DenseSlabAlloc to use a lock-free stack of batches of nodes. This way we don't take any locks in steady state at all and do only 1 push/pop per Refill/Drain. Effect on the added benchmark: $ TIME="%e %U %S %M" time ./test.old 36 5 2000000 34.51 978.22 175.67 5833592 32.53 891.73 167.03 5790036 36.17 1005.54 201.24 5802828 36.94 1004.76 226.58 5803188 $ TIME="%e %U %S %M" time ./test.new 36 5 2000000 26.44 720.99 13.45 5750704 25.92 721.98 13.58 5767764 26.33 725.15 13.41 5777936 25.93 713.49 13.41 5791796 Reviewed By: melver Differential Revision: https://reviews.llvm.org/D130002 | 3 年前 | |
tsan: add a benchmark for vector memory accesses Depends on D114592. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D114593 | 4 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
tsan: new runtime (v3) This change switches tsan to the new runtime which features: - 2x smaller shadow memory (2x of app memory) - faster fully vectorized race detection - small fixed-size vector clocks (512b) - fast vectorized vector clock operations - unlimited number of alive threads/goroutimes Depends on D112602. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D112603 | 4 年前 | |
tsan: declare annotations in test.h We already declare subset of annotations in test.h. But some are duplicated and declared in tests. Move all annotation declarations to test.h. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D102152 | 5 年前 | |
[msan] [NFC] Add newline to EOF in test. | 5 年前 | |
[tsan] Add missing link option to tsan test after #84923 Pull Request: https://github.com/llvm/llvm-project/pull/85003 | 2 年前 | |
Add %run to all lit tests llvm-svn: 207709 | 12 年前 | |
[tsan] Convert tests to check 'target=...' Part of the project to eliminate special handling for triples in lit expressions. | 3 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
[tsan] Make tests that use CLOCK_MONOTONIC portable Several tests rely on CLOCK_MONOTONIC, which doesn't exist on OS X. This patch fixes these tests by either disabling them (in case of cond_version.c which doesn't make sense on OS X), or by porting the test to also work on OS X. Differential Revision: http://reviews.llvm.org/D14861 llvm-svn: 253658 | 10 年前 | |
[tsan] Add Mutex annotation flag for constant-initialized __tsan_mutex_linker_init behavior Add a new flag, __tsan_mutex_not_static, which has the opposite sense of __tsan_mutex_linker_init. When the new __tsan_mutex_not_static flag is passed to __tsan_mutex_destroy, tsan ignores the destruction unless the mutex was also created with the __tsan_mutex_not_static flag. This is useful for constructors that otherwise woud set __tsan_mutex_linker_init but cannot, because they are declared constexpr. Google has a custom mutex with two constructors, a "linker initialized" constructor that relies on zero-initialization and sets __tsan_mutex_linker_init, and a normal one which sets no tsan flags. The "linker initialized" constructor is morally constexpr, but we can't declare it constexpr because of the need to call into tsan as a side effect. With this new flag, the normal c'tor can set __tsan_mutex_not_static, the "linker initialized" constructor can rely on tsan's lazy initialization, and __tsan_mutex_destroy can still handle both cases correctly. Author: Greg Falcon (gfalcon) Reviewed in: https://reviews.llvm.org/D39095 llvm-svn: 316209 | 8 年前 | |
[compiler-rt] NFC: Fix trivial typo Reviewed By: xgupta Differential Revision: https://reviews.llvm.org/D77457 | 4 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
[compiler-rt] Replace deprecated aligned_storage with aligned byte array (#94171) std::aligned_storage is deprecated with C++23, see [here](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p1413r3.pdf). This replaces the usages of std::aligned_storage within compiler-rt with an aligned std::byte array. I will provide patches for other subcomponents as well. | 2 年前 | |
[compiler-rt] Replace deprecated aligned_storage with aligned byte array (#94171) std::aligned_storage is deprecated with C++23, see [here](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p1413r3.pdf). This replaces the usages of std::aligned_storage within compiler-rt with an aligned std::byte array. I will provide patches for other subcomponents as well. | 2 年前 | |
[TSan][Test-Only] Account for race in cxa_guard_acquire.cpp test (#165853) It is possible for "Enter potentially blocking region" to come before "Enter constructor" in this test - if the thread that acquires the guard fails to reach its printf before the other thread that enters the blocking region reaches its own printf. Note that for the exit logs this inversion is not possible. This patch addresses this by allowing those two log lines to come in either order. rdar://163375661 | 9 个月前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
Revert "[tsan] Include unistd.h to declare gettid()" This reverts commit de8c4bef3329ce0045b8167cdb96d53b2a1509df. Unfortunately the fix-forward didn't work. Reverting both and will have Vitaly re-submit. | 2 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
Reland 2nd attempt: [tsan] Add debugging interfaces into interface header. Change __tsan_get_report_loc 6th argument 'size' to unsigned long * Reviewers: vitalybuka, dvyukov Differential Revision: https://reviews.llvm.org/D148214 | 3 年前 | |
Revert "[tsan] Add debugging interfaces into interface header." It broke lit tests on Mac, see comments on the code review. > Reviewed By: vitalybuka, dvyukov > > Differential Revision: https://reviews.llvm.org/D147337 This reverts commit ebb0f1d0639eeca5479fa4bfdc1ebcebf5c21dee and follow-up commit 3c83aeee6b7d5e9ac5de1e29605ee57c2b800ca1. | 3 年前 | |
[compiler-rt] NFC: Fix trivial typo Reviewed By: xgupta Differential Revision: https://reviews.llvm.org/D77457 | 4 年前 | |
tsan: add another deep stack test Add a test for a trace corner case that lead to a bug in experimental runtime replacement. Since it passes with the current runtime it makes sense to submit it on its own. Depends on D110264. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D110265 | 4 年前 | |
[NFC] Include tsan_interface.h in tests | 3 年前 | |
Title: [TSAN] Parameterize the hard-coded threshold of deflake in tsan test Summary: A number of testcases in TSAN are designed to deal with intermittent problems not exist in all executions of the tested program. A script called deflake.bash runs the executable up to 10 times to deal with the intermittent nature of the tests. The purpose of this patch is to parameterize the hard-coded threshold above via --cmake_variables=-DTSAN_TEST_DEFLAKE_THRESHOLD=SomeIntegerValue When this cmake var is not set, the default value of 10 will be used. Reviewer: dvyukov (Dmitry Vyukov), eugenis (Evgenii Stepanov), rnk (Reid Kleckner), hubert.reinterpretcast (Hubert Tong), vitalybuka (Vitaly Buka) Reviewed By: vitalybuka (Vitaly Buka) Subscribers: mgorny (Michal Gorny), jfb (JF Bastien), steven.zhang (qshanz), llvm-commits (Mailing List llvm-commits), Sanitizers Tag: LLVM, Sanitizers Differential Revision: https://reviews.llvm.org/D73707 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
[tsan] Convert tests to check 'target=...' Part of the project to eliminate special handling for triples in lit expressions. | 3 年前 | |
Remove NOLINTs from compiler-rt llvm-svn: 371687 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
tsan: fix another false positive related to open/close The false positive fixed by commit f831d6fc80 ("tsan: fix false positive during fd close") still happens episodically on the added more stressful test which does just open/close. I don't have a coherent explanation as to what exactly happens but the fix fixes the false positive on this test as well. The issue may be related to lost writes during asynchronous MADV_DONTNEED. I've debugged similar unexplainable false positive related to freed and reused memory and at the time the only possible explanation I found is that an asynchronous MADV_DONTNEED may lead to lost writes. That's why commit 302ec7b9bc ("tsan: add memory_limit_mb flag") added StopTheWorld around the memory flush, but unfortunately the commit does not capture these findings. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D121363 | 4 年前 | |
tsan: fix false positive during fd close FdClose is a subjet to the same atomicity problem as MemoryRangeFreed (memory state is not "monotoic" wrt race detection). So we need to lock the thread slot in FdClose the same way we do in MemoryRangeFreed. This fixes the modified stress.cpp test. Reviewed By: vitalybuka, melver Differential Revision: https://reviews.llvm.org/D121143 | 4 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
[compiler-rt] NFC: Fix trivial typo Reviewed By: xgupta Differential Revision: https://reviews.llvm.org/D77457 | 4 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
[Tests][TSan] Remove bash-ism |&, which is unsupported on other shells | 3 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
tsan: fix warnings in tests Fix format specifier. Fix warnings about non-standard attribute placement. Make free_race2.c test a bit more interesting: test access with/without an offset. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D101424 | 5 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
tsan: deflake flush_memory.cpp The test contains a race and checks that it's detected. But the race may not be detected since we are doing aggressive flushes and if the state flush happens between racing accesses, tsan won't detect the race). So return 1 to make the test deterministic regardless of the race. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D115612 | 4 年前 | |
[tsan] Disable test from D115759 on Darwin | 4 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
tsan: fix failures after multi-threaded fork Creating threads after a multi-threaded fork is semi-supported, we don't give particular guarantees, but we try to not fail on simple cases and we have die_after_fork=0 flag that enables not dying on creation of threads after a multi-threaded fork. This flag is used in the wild: https://github.com/mongodb/mongo/blob/23c052e3e321dbab90f1863d4d5539d7c1a1cf44/SConstruct#L3599 fork_multithreaded.cpp test started hanging in debug mode after the recent "tsan: fix deadlock during race reporting" commit, which added proactive ThreadRegistryLock check in SlotLock. But the test broke earlier after "tsan: remove quadratic behavior in pthread_join" commit which made tracking of alive threads based on pthread_t stricter (CHECK-fail on 2 threads with the same pthread_t, or joining a non-existent thread). When we start a thread after a multi-threaded fork, the new pthread_t can actually match one of existing values (for threads that don't exist anymore). Thread creation started CHECK-failing on this, but the test simply ignored this CHECK failure in the child thread and "passed". But after "tsan: fix deadlock during race reporting" the test started hanging dead, because CHECK failures recursively lock thread registry. Fix this purging all alive threads from thread registry on fork. Also the thread registry mutex somehow lost the internal deadlock detector id and was excluded from deadlock detection. If it would have the id, the CHECK wouldn't hang because of the nested CHECK failure due to the deadlock. But then again the test would have silently ignore this error as well and the bugs wouldn't have been noticed. Add the deadlock detector id to the thread registry mutex. Also extend the test to check more cases and detect more bugs. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D116091 | 4 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
tsan: fix warnings in tests Fix format specifier. Fix warnings about non-standard attribute placement. Make free_race2.c test a bit more interesting: test access with/without an offset. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D101424 | 5 年前 | |
Move TSan lit-tests under test/tsan llvm-svn: 201414 | 12 年前 | |
tsan: new runtime (v3) This change switches tsan to the new runtime which features: - 2x smaller shadow memory (2x of app memory) - faster fully vectorized race detection - small fixed-size vector clocks (512b) - fast vectorized vector clock operations - unlimited number of alive threads/goroutimes Depends on D112602. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D112603 | 4 年前 | |
tsan: fix free_race3.c test PPC64 bot failed with the following error. The buildbot output is not particularly useful, but looking at other similar tests, it seems that there is something broken in free stacks on PPC64. Use the same hack as other tests use to expect an additional stray frame. /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/compiler-rt/test/tsan/free_race3.c:28:11: error: CHECK: expected string not found in input // CHECK: Previous write of size 4 at {{.*}} by thread T1{{.*}}: ^ <stdin>:13:9: note: scanning from here #1 main /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/compiler-rt/test/tsan/free_race3.c:17:3 (free_race3.c.tmp+0x1012fab8) ^ <stdin>:17:2: note: possible intended match here ThreadSanitizer: reported 1 warnings ^ Input file: <stdin> Check file: /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/compiler-rt/test/tsan/free_race3.c -dump-input=help explains the following input dump. Input was: <<<<<< . . . 8: Previous write of size 4 at 0x7ffff4d01ab0 by thread T1: 9: #0 Thread /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/compiler-rt/test/tsan/free_race3.c:8:10 (free_race3.c.tmp+0x1012f9dc) 10: 11: Thread T1 (tid=3222898, finished) created by main thread at: 12: #0 pthread_create /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1001:3 (free_race3.c.tmp+0x100b9040) 13: #1 main /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/compiler-rt/test/tsan/free_race3.c:17:3 (free_race3.c.tmp+0x1012fab8) check:28'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found 14: check:28'0 ~ 15: SUMMARY: ThreadSanitizer: data race /home/buildbots/ppc64le-clang-lnt-test/clang-ppc64le-lnt/llvm/compiler-rt/test/tsan/free_race3.c:19:3 in main check:28'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 16: ================== check:28'0 ~~~~~~~~~~~~~~~~~~~ 17: ThreadSanitizer: reported 1 warnings check:28'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ check:28'1 ? possible intended match >>>>>> Reviewed By: melver Differential Revision: https://reviews.llvm.org/D112444 | 4 年前 | |
[tsan] Disabled test dead locking on glibc-2.38 https://github.com/google/sanitizers/issues/1733 | 2 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
Update compiler-rt cpplint.py https://github.com/cpplint/cpplint/commit/adb3500107f409ac5491188ae652ac3f4d03d9d3 llvm-svn: 371675 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
[TSan] Add AnnotateIgnoreReadsBegin declaration to tsan/test.h Declare the family of AnnotateIgnore[Read,Write][Begin,End] TSan annotations in compiler-rt/test/tsan/test.h so that we don't have to declare them separately in every test that needs them. Replace usages. Leave usages that explicitly test the annotation mechanism: thread_end_with_ignore.cpp thread_end_with_ignore3.cpp llvm-svn: 371446 | 6 年前 | |
Reapply "[TSan] Make Test work with Internal Shell" This reverts commit 39f08eb997424626bd396a0529daf4ab816d19e6. This was causing buildbot failures because we were using an explicit python call instead of the python substitution. This leads to failures on platforms that do not have a binary called python. | 9 个月前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
[tsan] Convert tests to check 'target=...' Part of the project to eliminate special handling for triples in lit expressions. | 3 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
[tsan] Allow unloading of ignored libraries (#105660) Allows unloading and reloading of ignored libraries. We don't attempt to reuse or free memory of unloaded library. So TSan will assert if an ignored library is reloaded 128 times. Co-authored-by: Vitaly Buka <vitalybuka@gmail.com> | 1 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
[tsan] Convert tests to check 'target=...' Part of the project to eliminate special handling for triples in lit expressions. | 3 年前 | |
[tsan] Convert tests to check 'target=...' Part of the project to eliminate special handling for triples in lit expressions. | 3 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
[tsan] Convert tests to check 'target=...' Part of the project to eliminate special handling for triples in lit expressions. | 3 年前 | |
tsan: fix pthread_detach with called_from_lib suppressions Generally we ignore interceptors coming from called_from_lib-suppressed libraries. However, we must not ignore critical interceptors like e.g. pthread_create, otherwise runtime will lost track of threads. pthread_detach is one of these interceptors we should not ignore as it affects thread states and behavior of pthread_join which we don't ignore as well. Currently we can produce very obscure false positives. For more context see: https://groups.google.com/forum/#!topic/thread-sanitizer/ecH2P0QUqPs The added test captures this pattern. While we are here rename ThreadTid to ThreadConsumeTid to make it clear that it's not just a "getter", it resets user_id to 0. This lead to confusion recently. Reviewed in https://reviews.llvm.org/D74828 | 6 年前 | |
Move TSan lit-tests under test/tsan llvm-svn: 201414 | 12 年前 | |
[TSan] Add AnnotateIgnoreReadsBegin declaration to tsan/test.h Declare the family of AnnotateIgnore[Read,Write][Begin,End] TSan annotations in compiler-rt/test/tsan/test.h so that we don't have to declare them separately in every test that needs them. Replace usages. Leave usages that explicitly test the annotation mechanism: thread_end_with_ignore.cpp thread_end_with_ignore3.cpp llvm-svn: 371446 | 6 年前 | |
[TSan] Add AnnotateIgnoreReadsBegin declaration to tsan/test.h Declare the family of AnnotateIgnore[Read,Write][Begin,End] TSan annotations in compiler-rt/test/tsan/test.h so that we don't have to declare them separately in every test that needs them. Replace usages. Leave usages that explicitly test the annotation mechanism: thread_end_with_ignore.cpp thread_end_with_ignore3.cpp llvm-svn: 371446 | 6 年前 | |
tsan: declare annotations in test.h We already declare subset of annotations in test.h. But some are duplicated and declared in tests. Move all annotation declarations to test.h. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D102152 | 5 年前 | |
tsan: extend mmap test Test size larger than clear_shadow_mmap_threshold, which is handled differently. Depends on D114348. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D114366 | 4 年前 | |
[clang] accept -fsanitize-ignorelist= in addition to -fsanitize-blacklist= Use that for internal names (including the default ignorelists of the sanitizers). Differential Revision: https://reviews.llvm.org/D101832 | 5 年前 | |
tsan: fix warnings in tests Compilers don't like attributes in this position: warning: GCC does not allow 'noinline' attribute in this position on a function definition error: attributes are not allowed on a function-definition Reviewed By: melver Differential Revision: https://reviews.llvm.org/D106951 | 4 年前 | |
[tsan] Replace mem intrinsics with calls to interceptors After https://reviews.llvm.org/rG463aa814182a23 tsan replaces llvm intrinsics with calls to glibc functions. However this approach is fragile, as slight changes in pipeline can return llvm intrinsics back. In particular InstCombine can do that. Msan/Asan already declare own version of these memory functions for the similar purpose. KCSAN, or anything that uses something else than compiler-rt, needs to implement this callbacks. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D133268 | 3 年前 | |
[tsan] Replace mem intrinsics with calls to interceptors After https://reviews.llvm.org/rG463aa814182a23 tsan replaces llvm intrinsics with calls to glibc functions. However this approach is fragile, as slight changes in pipeline can return llvm intrinsics back. In particular InstCombine can do that. Msan/Asan already declare own version of these memory functions for the similar purpose. KCSAN, or anything that uses something else than compiler-rt, needs to implement this callbacks. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D133268 | 3 年前 | |
[TSAN] Make tsan tests more portable (take 3) Some tests didn't merge stderr with stdout. Patch by Maxim Kuvyrkov. llvm-svn: 266426 | 10 年前 | |
[NFC][tsan] Add include guards | 3 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
[NFC] Size and element numbers are often swapped when calling calloc (#79081) gcc-14 will now throw a warning if size and elements are swapped. | 2 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
Reland [TSan] Clarify and enforce shadow end alignment (#146676) #144648 was reverted because it failed the new sanitizer test munmap_clear_shadow.c in IOS's CI. That issue could be fixed by disabling the test on some platforms, due to the incompatibility of the test on these platforms. In detail, we should disable the test in FreeBSD, Apple, NetBSD, Solaris, and Haiku, where ReleaseMemoryPagesToOS executes madvise(beg, end, MADV_FREE), which tags the relevant pages as 'FREE' and does not release them immediately. | 1 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
tsan: reset destination range in Java heap move Switch Java heap move to the new scheme required for the new tsan runtime. Instead of copying the shadow we reset the destination range. The new v3 trace contains addresses of accesses, so we cannot simply copy the shadow. This can lead to false negatives, but cannot lead to false positives. Depends on D110159. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D110190 | 4 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
tsan: reset destination range in Java heap move Switch Java heap move to the new scheme required for the new tsan runtime. Instead of copying the shadow we reset the destination range. The new v3 trace contains addresses of accesses, so we cannot simply copy the shadow. This can lead to false negatives, but cannot lead to false positives. Depends on D110159. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D110190 | 4 年前 | |
[tsan] Convert tests to check 'target=...' Part of the project to eliminate special handling for triples in lit expressions. | 3 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
[NFC] Include tsan_interface.h in tests | 3 年前 | |
[NFC] Include tsan_interface.h in tests | 3 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
Rename config.host_os to config.target_os. config.host_os is derived from CMAKE_SYSTEM_NAME which specifies the target. See: https://cmake.org/cmake/help/latest/variable/CMAKE_SYSTEM_NAME.html To reduce confusion, rename it to config.target_os. The variable name config.target_os was already being used by the Orc tests. Rename it to config.orc_test_target_os with a FIXME to remove. Reviewers: JDevlieghere, MaskRay Reviewed By: MaskRay Pull Request: https://github.com/llvm/llvm-project/pull/149015 | 1 年前 | |
[compiler-rt] Provide a lit config variable that defines the minimum deployment OS version flag appropriate for the configured OS. This patch defines config.apple_platform_min_deployment_target_flag in the ASan, LibFuzzer, TSan, and UBSan lit test configs. rdar://problem/59463146 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
tsan: fix warnings in tests Compilers don't like attributes in this position: warning: GCC does not allow 'noinline' attribute in this position on a function definition error: attributes are not allowed on a function-definition Reviewed By: melver Differential Revision: https://reviews.llvm.org/D106951 | 4 年前 | |
tsan: fix warnings in tests Compilers don't like attributes in this position: warning: GCC does not allow 'noinline' attribute in this position on a function definition error: attributes are not allowed on a function-definition Reviewed By: melver Differential Revision: https://reviews.llvm.org/D106951 | 4 年前 | |
[TSan] Make test fail more predictably This test would hang when the system ran out of resources and we fail to create all 300 threads. Differential Revision: https://reviews.llvm.org/D115845 | 4 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
[TSan] Increase the number of simultaneously locked mutexes that a thread can hold (#116409) I've run into an issue where TSan can't be used on some code without turning off deadlock detection because a thread tries to hold too many mutexes. It would be preferable to be able to use deadlock detection as that is a major benefit of TSan. Its mentioned in https://github.com/google/sanitizers/issues/950 that the 64 mutex limit was an arbitrary number. I've increased it to 128 and all the tests still pass. Considering the increasing number of cores on CPUs and how programs can now use more threads to take advantage of it, I think raising the limit to 128 would be some good future proofing --------- Co-authored-by: Vitaly Buka <vitalybuka@google.com> | 1 年前 | |
[TSAN] add support for riscv64 (#68735) Implements for sv39 and sv48 VMA layout. Userspace only has access to the bottom half of vma range. The top half is used by kernel. There is no dedicated vsyscall or heap segment. PIE program is allocated to start at TASK_SIZE/3*2. Maximum ASLR is ARCH_MMAP_RND_BITS_MAX+PAGE_SHIFT=24+12=36 Loader, vdso and other libraries are allocated below stack from the top. Also change RestoreAddr to use 4 bits to accommodate MappingRiscv64_48 Reviewed by: MaskRay, dvyukov, asb, StephenFan, luismarques, jrtc27, hiraditya, vitalybuka Differential Revision: https://reviews.llvm.org/D145214 D145214 was reverted because one file was missing in the latest commit. Luckily the file was there in the previous commit, probably the author missed uploading that file with latest commit. Co-authored-by: Alex Fan <alex.fan.q@gmail.com> | 2 年前 | |
[tsan] Replace mem intrinsics with calls to interceptors After https://reviews.llvm.org/rG463aa814182a23 tsan replaces llvm intrinsics with calls to glibc functions. However this approach is fragile, as slight changes in pipeline can return llvm intrinsics back. In particular InstCombine can do that. Msan/Asan already declare own version of these memory functions for the similar purpose. KCSAN, or anything that uses something else than compiler-rt, needs to implement this callbacks. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D133268 | 3 年前 | |
[tsan] Replace mem intrinsics with calls to interceptors After https://reviews.llvm.org/rG463aa814182a23 tsan replaces llvm intrinsics with calls to glibc functions. However this approach is fragile, as slight changes in pipeline can return llvm intrinsics back. In particular InstCombine can do that. Msan/Asan already declare own version of these memory functions for the similar purpose. KCSAN, or anything that uses something else than compiler-rt, needs to implement this callbacks. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D133268 | 3 年前 | |
[TSAN] add support for riscv64 (#68735) Implements for sv39 and sv48 VMA layout. Userspace only has access to the bottom half of vma range. The top half is used by kernel. There is no dedicated vsyscall or heap segment. PIE program is allocated to start at TASK_SIZE/3*2. Maximum ASLR is ARCH_MMAP_RND_BITS_MAX+PAGE_SHIFT=24+12=36 Loader, vdso and other libraries are allocated below stack from the top. Also change RestoreAddr to use 4 bits to accommodate MappingRiscv64_48 Reviewed by: MaskRay, dvyukov, asb, StephenFan, luismarques, jrtc27, hiraditya, vitalybuka Differential Revision: https://reviews.llvm.org/D145214 D145214 was reverted because one file was missing in the latest commit. Luckily the file was there in the previous commit, probably the author missed uploading that file with latest commit. Co-authored-by: Alex Fan <alex.fan.q@gmail.com> | 2 年前 | |
tsan: fix mmap_lots test If tsan runtime will try to allocate something during exit handling, the allocation will fail because there is no VA whatsoever. It's observed to fail with the following error in some cases: failed to allocate 0x1000 (4096) bytes of DTLS_NextBlock. So terminate the process immediately. Reviewed-in: https://reviews.llvm.org/D96874 | 5 年前 | |
tsan: re-enable mmap_stress.cpp test The comment says it was flaky in 2016, but it wasn't possible to debug it back then. Re-enable the test at least on linux/x86_64. It will either work, or at least we should see failure output from lit today. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D104592 | 5 年前 | |
tsan: fix mmap atomicity Mmap interceptor is not atomic in the sense that it exposes unmapped shadow for a brief period of time. This breaks programs that mmap over another mmap and access the region concurrently. Don't unmap shadow in the mmap interceptor to fix this. Just mapping new shadow on top should be enough to zero it. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D104593 | 5 年前 | |
tsan: fix a bug memory access handling We incorrectly replaced shadow slots when the new value is not stronger than the old one. The bug can lead to false negatives. The bug was detected by Go race test suite: https://github.com/golang/go/issues/10589 llvm-svn: 236008 | 11 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
Reland [TSan] Clarify and enforce shadow end alignment (#146676) #144648 was reverted because it failed the new sanitizer test munmap_clear_shadow.c in IOS's CI. That issue could be fixed by disabling the test on some platforms, due to the incompatibility of the test on these platforms. In detail, we should disable the test in FreeBSD, Apple, NetBSD, Solaris, and Haiku, where ReleaseMemoryPagesToOS executes madvise(beg, end, MADV_FREE), which tags the relevant pages as 'FREE' and does not release them immediately. | 1 年前 | |
tsan: disable munmap_invalid.cpp test on darwin It failed on bots: https://green.lab.llvm.org/green//job/clang-stage1-RA/25954/consoleFull#-1417328700a1ca8a51-895e-46c6-af87-ce24fa4cd561 and it doesn't provide the test output. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D114972 | 4 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
tsan: declare annotations in test.h We already declare subset of annotations in test.h. But some are duplicated and declared in tests. Move all annotation declarations to test.h. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D102152 | 5 年前 | |
tsan: declare annotations in test.h We already declare subset of annotations in test.h. But some are duplicated and declared in tests. Move all annotation declarations to test.h. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D102152 | 5 年前 | |
tsan: declare annotations in test.h We already declare subset of annotations in test.h. But some are duplicated and declared in tests. Move all annotation declarations to test.h. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D102152 | 5 年前 | |
tsan: align default value of detect_deadlocks flag with actual behavior I tricked myself into thinking that deadlock detection is off by default in TSan by looking at the default value of the detect_deadlocks flag and outdated docs. (Created a pull request to update docs.) I even managed to confuse others: https://groups.google.com/forum/#!topic/thread-sanitizer/xYvnAYwtoDk However, the default value is overwritten in code (TSan_flags.cc:InitializeFlags). The TSan/deadlock tests also rely on this This changes aligns the default value of the flag with the actual default behavior. Author: yln (Julian Lettner) Reviewed in: https://reviews.llvm.org/D55846 llvm-svn: 349609 | 7 年前 | |
[tsan] Don't abort when a deadlock detector finds a mutex cycle longer than 10 In one of the already existing apps that I'm testing TSan on, I really see a mutex path that is longer than 10 (but not by much, something like 11-13 actually). Let's raise this to 20 and weaken the assertion so we don't crash. Differential Revision: http://reviews.llvm.org/D20427 llvm-svn: 270319 | 10 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
tsan: declare annotations in test.h We already declare subset of annotations in test.h. But some are duplicated and declared in tests. Move all annotation declarations to test.h. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D102152 | 5 年前 | |
[TSAN] Add __tsan_check_no_mutexes_held helper (#71568) This adds a new helper that can be called from application code to ensure that no mutexes are held on specific code paths. This is useful for multiple scenarios, including ensuring no locks are held: - at thread exit - in peformance-critical code - when a coroutine is suspended (can cause deadlocks) See this discourse thread for more discussion: https://discourse.llvm.org/t/add-threadsanitizer-check-to-prevent-coroutine-suspending-while-holding-a-lock-potential-deadlock/74051 This resubmits and fixes #69372 (was reverted because of build breakage). This also includes the followup change #71471 (to fix a land race). | 2 年前 | |
[tsan] Convert tests to check 'target=...' Part of the project to eliminate special handling for triples in lit expressions. | 3 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
tsan: declare annotations in test.h We already declare subset of annotations in test.h. But some are duplicated and declared in tests. Move all annotation declarations to test.h. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D102152 | 5 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
tsan: new runtime (v3) This change switches tsan to the new runtime which features: - 2x smaller shadow memory (2x of app memory) - faster fully vectorized race detection - small fixed-size vector clocks (512b) - fast vectorized vector clock operations - unlimited number of alive threads/goroutimes Depends on D112602. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D112603 | 4 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
[TSan][Darwin] Mark test unsupported | 4 年前 | |
Reapply "[compiler-rt] Remove %T from shared object substitutions (#155302)" This reverts commit 05e31438ac9491cfc72c48664480796de874c860. There was quite a bit of churn with this patch, everytime related to the executable no longer being in the same directory as the shared objects. This reland ensures that all of the executables in the tests touched are in the same directory as the shared objects in the substitutions. | 10 个月前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
[TSan] Add a runtime flag to print full thread creation stacks up to the main thread Currently, we only print how threads involved in data race are created from their parent threads. Add a runtime flag 'print_full_thread_history' to print thread creation stacks for the threads involved in the data race and their ancestors up to the main thread. Reviewed By: dvyukov Differential Revision: https://reviews.llvm.org/D122131 | 4 年前 | |
[TSan] PR26609: Fix two test cases. llvm-svn: 261148 | 10 年前 | |
tsan: refactor fork handling Commit efd254b6362 ("tsan: fix deadlock in pthread_atfork callbacks") fixed another deadlock related to atfork handling. But builders with DCHECKs enabled reported failures of pthread_atfork_deadlock2.c and pthread_atfork_deadlock3.c tests related to the fact that we hold runtime locks on interceptor exit: https://lab.llvm.org/buildbot/#/builders/70/builds/6727 This issue is somewhat inherent to the current approach, we indeed execute user code (atfork callbacks) with runtime lock held. Refactor fork handling to not run user code (atfork callbacks) with runtime locks held. This change does this by installing own atfork callbacks during runtime initialization. Atfork callbacks run in LIFO order, so the expectation is that our callbacks run last, right before the actual fork. This way we lock runtime mutexes around fork, but not around user callbacks. Extend tests to also install after fork callbacks just to cover more scenarios. Some tests also started reporting real races that we previously suppressed. Also extend tests to cover fork syscall support. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D101517 | 5 年前 | |
tsan: refactor fork handling Commit efd254b6362 ("tsan: fix deadlock in pthread_atfork callbacks") fixed another deadlock related to atfork handling. But builders with DCHECKs enabled reported failures of pthread_atfork_deadlock2.c and pthread_atfork_deadlock3.c tests related to the fact that we hold runtime locks on interceptor exit: https://lab.llvm.org/buildbot/#/builders/70/builds/6727 This issue is somewhat inherent to the current approach, we indeed execute user code (atfork callbacks) with runtime lock held. Refactor fork handling to not run user code (atfork callbacks) with runtime locks held. This change does this by installing own atfork callbacks during runtime initialization. Atfork callbacks run in LIFO order, so the expectation is that our callbacks run last, right before the actual fork. This way we lock runtime mutexes around fork, but not around user callbacks. Extend tests to also install after fork callbacks just to cover more scenarios. Some tests also started reporting real races that we previously suppressed. Also extend tests to cover fork syscall support. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D101517 | 5 年前 | |
[compiler-rt] Mark more calls as blocking (#77789) If we're in a blocking call, we need to run the signal immediately, as the call may not return for a very long time (if ever). Not running the handler can cause deadlocks if the rest of the program waits (in one way or another) for the signal handler to execute. I've gone through the list of functions in sanitizer_common_interceptors and marked as blocking those that I know can block, but I don't claim the list to be exhaustive. In particular, I did not mark libc FILE* functions as blocking, because these can end up calling user functions. To do that correctly, /I think/ it would be necessary to clear the "is in blocking call" flag inside the fopencookie wrappers. The test for the bug (deadlock) uses the read call (which is the one that I ran into originally), but the same kind of test could be written for any other blocking syscall. | 2 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
[tsan] Make pthread_mutex_clocklock Linux only Many systems (glibc<2.30, Bionic before 2019, musl, macOS, etc) do not have the function. | 2 年前 | |
[tsan] Mark tests that need pthread barriers with "UNSUPPORTED: darwin" Several testcases need pthread barriers (e.g. all bench_*.cc which use test/tsan/bench.h) which are not available on OS X. Let's mark them with "UNSUPPORTED: darwin". Differential Revision: http://reviews.llvm.org/D14636 llvm-svn: 253558 | 10 年前 | |
[tsan] Mark tests that need pthread barriers with "UNSUPPORTED: darwin" Several testcases need pthread barriers (e.g. all bench_*.cc which use test/tsan/bench.h) which are not available on OS X. Let's mark them with "UNSUPPORTED: darwin". Differential Revision: http://reviews.llvm.org/D14636 llvm-svn: 253558 | 10 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
tsan: fix warnings in tests Compilers don't like attributes in this position: warning: GCC does not allow 'noinline' attribute in this position on a function definition error: attributes are not allowed on a function-definition Reviewed By: melver Differential Revision: https://reviews.llvm.org/D106951 | 4 年前 | |
[TSAN] Fix build bot failure for powerpc64le race_on_mutex.c passes for powerpc64le too after revision 263778. So removing the XFAIL marker. llvm-svn: 263779 | 10 年前 | |
tsan: remove sleeps from tests Even sleep(1) lead to episodical flakes on some machines. Use an invisible by tsan barrier to enforce required execution order instead. This makes the tests deterministic and faster. llvm-svn: 226659 | 11 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
[tsan] Convert tests to check 'target=...' Part of the project to eliminate special handling for triples in lit expressions. | 3 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
tsan: fix warnings in tests Compilers don't like attributes in this position: warning: GCC does not allow 'noinline' attribute in this position on a function definition error: attributes are not allowed on a function-definition Reviewed By: melver Differential Revision: https://reviews.llvm.org/D106951 | 4 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
[tsan] Convert tests to check 'target=...' Part of the project to eliminate special handling for triples in lit expressions. | 3 年前 | |
[tsan] Disable tests flaky on PPC with COMPILER_RT_DEBUG Workaround for https://github.com/google/sanitizers/issues/1792 | 1 年前 | |
tsan: mark sigwait as blocking Add a test case reported in: https://github.com/google/sanitizers/issues/1401 and fix it. The code assumes sigwait will process other signals. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D102057 | 5 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
Revert "[compiler-rt] Also consider SIGPROF as a synchronous signal" (#86416) Reverting #85188 with follow up patches. This reverts commit 362d26366d0175f01ffb6085eb747a6e40f01147. This reverts commit c9bdeabdf4b46fbf1f6a9fcbf9cd61d460b18c08. This reverts commit 6bc6e1ace9fa8453e164fa04b5d9acd5a77e089a. This reverts commit 01fa550ff654d6724e6da54c877032baeddff14b. This reverts commit ddcbab37ac0e5743a8d39be3dd48d967f4c85504. | 2 年前 | |
tsan: don't call dlsym during exit dlsym calls into dynamic linker which calls malloc and other things. It's problematic to do it during the actual exit, because it can happen from a singal handler or from within the runtime after we reported the first bug, etc. See https://github.com/google/sanitizers/issues/1440 for an example (captured in the added test). Initialize the callbacks during startup instead. Depends on D110159. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D110166 | 4 年前 | |
Fix flaky test: signal_in_mutex_lock.cpp (#92587) Fix flaky test: the spawned thread keeps spinning on sampler_mutex which may be released before the thread is terminated based on termination ordering. My understanding of C++ semantics are that the program here is invalid: the destructors of global variables are invoked at the time of program termination, and it is the responsibility of the program to ensure that invoking those destructors is safe. rdar://126768628 | 2 年前 | |
[compiler-rt] Mark more calls as blocking (#77789) If we're in a blocking call, we need to run the signal immediately, as the call may not return for a very long time (if ever). Not running the handler can cause deadlocks if the rest of the program waits (in one way or another) for the signal handler to execute. I've gone through the list of functions in sanitizer_common_interceptors and marked as blocking those that I know can block, but I don't claim the list to be exhaustive. In particular, I did not mark libc FILE* functions as blocking, because these can end up calling user functions. To do that correctly, /I think/ it would be necessary to clear the "is in blocking call" flag inside the fopencookie wrappers. The test for the bug (deadlock) uses the read call (which is the one that I ran into originally), but the same kind of test could be written for any other blocking syscall. | 2 年前 | |
[tsan] Convert tests to check 'target=...' Part of the project to eliminate special handling for triples in lit expressions. | 3 年前 | |
tsan: extend signal_malloc test Test that we report the warning for free() and ensure the test finishes as we usually do with "DONE". Depends on D106951. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D106952 | 4 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
[TSan][Test] Disable signal_recursive.cpp test on Darwin (#141135) Mark signal_recursive.cpp test as unsupported on Darwin due to deprecated API sem_init and test receives error: sem_init failed (errno=78) | 1 年前 | |
[tsan] Disable tests flaky on PPC with COMPILER_RT_DEBUG Workaround for https://github.com/google/sanitizers/issues/1792 | 1 年前 | |
Revert "[compiler-rt] Also consider SIGPROF as a synchronous signal" (#86416) Reverting #85188 with follow up patches. This reverts commit 362d26366d0175f01ffb6085eb747a6e40f01147. This reverts commit c9bdeabdf4b46fbf1f6a9fcbf9cd61d460b18c08. This reverts commit 6bc6e1ace9fa8453e164fa04b5d9acd5a77e089a. This reverts commit 01fa550ff654d6724e6da54c877032baeddff14b. This reverts commit ddcbab37ac0e5743a8d39be3dd48d967f4c85504. | 2 年前 | |
[tsan] Convert tests to check 'target=...' Part of the project to eliminate special handling for triples in lit expressions. | 3 年前 | |
Revert "[compiler-rt] Also consider SIGPROF as a synchronous signal" (#86416) Reverting #85188 with follow up patches. This reverts commit 362d26366d0175f01ffb6085eb747a6e40f01147. This reverts commit c9bdeabdf4b46fbf1f6a9fcbf9cd61d460b18c08. This reverts commit 6bc6e1ace9fa8453e164fa04b5d9acd5a77e089a. This reverts commit 01fa550ff654d6724e6da54c877032baeddff14b. This reverts commit ddcbab37ac0e5743a8d39be3dd48d967f4c85504. | 2 年前 | |
[tsan] Disable tests flaky on PPC with COMPILER_RT_DEBUG Workaround for https://github.com/google/sanitizers/issues/1792 | 1 年前 | |
tsan: fix a race when assigning ThreadSignalContext The SigCtx function lazily allocates a ThreadSignalContext, and stores it in the ThreadState. This function may be called by various interceptors and the signal handler itself. If SigCtx itself is interrupted by a signal, then (prior to this fix) there was a possibility of allocating two ThreadSignalContexts. This not only leaks, it fails to deliver the signal to the program's signal handler, as the recorded signal is overwritten by the new ThreadSignalContext. Fix this by using a CAS to swap in the ThreadSignalContext, preventing the race. Add a test for this case. Reviewed By: dvyukov, melver Differential Revision: https://reviews.llvm.org/D140582 | 3 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
tsan: remove sleeps from tests Even sleep(1) lead to episodical flakes on some machines. Use an invisible by tsan barrier to enforce required execution order instead. This makes the tests deterministic and faster. llvm-svn: 226659 | 11 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
[Sanitizer] Fix sanitizer tests without reducing optimization levels As discussed, these tests are compiled with optimization to mimic real sanitizer usage [1]. Let's mark relevant functions with noinline so we can continue to check against the stack traces in the report. [1] https://reviews.llvm.org/D96198 This reverts commit 04af72c5423eb5ff7c0deba2d08cb46d583bb9d4. Differential Revision: https://reviews.llvm.org/D96357 | 5 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
tsan: fix warnings in tests Fix format specifier. Fix warnings about non-standard attribute placement. Make free_race2.c test a bit more interesting: test access with/without an offset. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D101424 | 5 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
[TSan, SanitizerBinaryMetadata] Analyze the capture status for alloca rather than arbitrary Addr (#132756) This PR is based on my last PR #132752 (the first commit of this PR), but addressing a different issue. This commit addresses the limitation in PointerMayBeCaptured analysis when dealing with derived pointers (e.g. arr+1) as described in issue #132739. The current implementation of PointerMayBeCaptured may miss captures of the underlying alloca when analyzing derived pointers, leading to some FNs in TSan, as follows: cpp void *Thread(void *a) { ((int*)a)[1] = 43; return 0; } int main() { int Arr[2] = {41, 42}; pthread_t t; pthread_create(&t, 0, Thread, &Arr[0]); // Missed instrumentation here due to the FN of PointerMayBeCaptured Arr[1] = 43; barrier_wait(&barrier); pthread_join(t, 0); } Refer to this [godbolt page](https://godbolt.org/z/n67GrxdcE) to get the compilation result of TSan. Even when PointerMayBeCaptured working correctly, it should backtrack to the original alloca firstly during analysis, causing redundancy to the outer's findAllocaForValue. cpp const AllocaInst *AI = findAllocaForValue(Addr); // Instead of Addr, we should check whether its base pointer is captured. if (AI && !PointerMayBeCaptured(Addr, true)) ... Key changes: Directly analyze the capture status of the underlying alloca instead of derived pointers to ensure accurate capture detection cpp const AllocaInst *AI = findAllocaForValue(Addr); // Instead of Addr, we should check whether its base pointer is captured. if (AI && !PointerMayBeCaptured(AI, true)) ... | 1 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
Fix a deadlock in __cxa_guard_abort in tsan hat tip: @The_Whole_Daisy for helping to isolate Reviewed By: dvyukov, fowles Differential Revision: https://reviews.llvm.org/D113713 | 4 年前 | |
[tsan] Convert tests to check 'target=...' Part of the project to eliminate special handling for triples in lit expressions. | 3 年前 | |
tsan: remove tracking of racy addresses We used to deduplicate based on the race address to prevent lots of repeated reports about the same race. But now we clear the shadow for the racy address in DoReportRace: // This prevents trapping on this address in future. for (uptr i = 0; i < kShadowCnt; i++) StoreShadow(&shadow_mem[i], i == 0 ? Shadow::kRodata : Shadow::kEmpty); It should have the same effect of not reporting duplicates (and actually better because it's automatically reset when the memory is reallocated). So drop the address deduplication code. Both simpler and faster. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D130240 | 3 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
[Clang][CodeGen] Add disable_sanitizer_instrumentation attribute to multiversion resolvers (#167516) - Fixes https://github.com/llvm/llvm-project/issues/163369 - Segmentation fault occurred because resolver was calling TSan instrumentation functions (__tsan_func_entry, __tsan_func_exit) but as the resolver is run by the dynamic linker at load time, TSan is not initialized yet so the current thread pointer is null. - This PR adds the DisableSanitizerInstrumentation attribute to the multiversion function resolvers to avoid issues like this. - Added regression test for TSan segfault. | 8 个月前 | |
[TSAN] add support for riscv64 (#68735) Implements for sv39 and sv48 VMA layout. Userspace only has access to the bottom half of vma range. The top half is used by kernel. There is no dedicated vsyscall or heap segment. PIE program is allocated to start at TASK_SIZE/3*2. Maximum ASLR is ARCH_MMAP_RND_BITS_MAX+PAGE_SHIFT=24+12=36 Loader, vdso and other libraries are allocated below stack from the top. Also change RestoreAddr to use 4 bits to accommodate MappingRiscv64_48 Reviewed by: MaskRay, dvyukov, asb, StephenFan, luismarques, jrtc27, hiraditya, vitalybuka Differential Revision: https://reviews.llvm.org/D145214 D145214 was reverted because one file was missing in the latest commit. Luckily the file was there in the previous commit, probably the author missed uploading that file with latest commit. Co-authored-by: Alex Fan <alex.fan.q@gmail.com> | 2 年前 | |
[TSAN] Make tsan tests more portable (take 3) Some tests didn't merge stderr with stdout. Patch by Maxim Kuvyrkov. llvm-svn: 266426 | 10 年前 | |
[TSAN] Make tsan tests more portable (take 3) Some tests didn't merge stderr with stdout. Patch by Maxim Kuvyrkov. llvm-svn: 266426 | 10 年前 | |
tsan: new runtime (v3) This change switches tsan to the new runtime which features: - 2x smaller shadow memory (2x of app memory) - faster fully vectorized race detection - small fixed-size vector clocks (512b) - fast vectorized vector clock operations - unlimited number of alive threads/goroutimes Depends on D112602. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D112603 | 4 年前 | |
tsan: new runtime (v3) This change switches tsan to the new runtime which features: - 2x smaller shadow memory (2x of app memory) - faster fully vectorized race detection - small fixed-size vector clocks (512b) - fast vectorized vector clock operations - unlimited number of alive threads/goroutimes Depends on D112602. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D112603 | 4 年前 | |
tsan: new runtime (v3) This change switches tsan to the new runtime which features: - 2x smaller shadow memory (2x of app memory) - faster fully vectorized race detection - small fixed-size vector clocks (512b) - fast vectorized vector clock operations - unlimited number of alive threads/goroutimes Depends on D112602. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D112603 | 4 年前 | |
[tsan] Convert tests to check 'target=...' Part of the project to eliminate special handling for triples in lit expressions. | 3 年前 | |
[TSAN] Make tsan tests more portable (take 3) Some tests didn't merge stderr with stdout. Patch by Maxim Kuvyrkov. llvm-svn: 266426 | 10 年前 | |
[TSAN] Make tsan tests more portable (take 3) Some tests didn't merge stderr with stdout. Patch by Maxim Kuvyrkov. llvm-svn: 266426 | 10 年前 | |
tsan: remove sleeps from tests Even sleep(1) lead to episodical flakes on some machines. Use an invisible by tsan barrier to enforce required execution order instead. This makes the tests deterministic and faster. llvm-svn: 226659 | 11 年前 | |
[TSAN] Make tsan tests more portable (take 3) Some tests didn't merge stderr with stdout. Patch by Maxim Kuvyrkov. llvm-svn: 266426 | 10 年前 | |
tsan: remove sleeps from tests Even sleep(1) lead to episodical flakes on some machines. Use an invisible by tsan barrier to enforce required execution order instead. This makes the tests deterministic and faster. llvm-svn: 226659 | 11 年前 | |
tsan: declare annotations in test.h We already declare subset of annotations in test.h. But some are duplicated and declared in tests. Move all annotation declarations to test.h. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D102152 | 5 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
tsan: remove sleeps from tests Even sleep(1) lead to episodical flakes on some machines. Use an invisible by tsan barrier to enforce required execution order instead. This makes the tests deterministic and faster. llvm-svn: 226659 | 11 年前 | |
Add a %darwin_min_target_with_tls_support lit substitution. Summary: This substitution expands to the appropriate minimum deployment target flag where thread local storage (TLS) was first introduced on Darwin platforms. For all other platforms the substitution expands to an empty string. E.g. for macOS the substitution expands to -mmacosx-version-min=10.12 This patch adds support for the substitution (and future substitutions) by doing a minor refactor and then uses the substitution in the relevant TSan tests. rdar://problem/59568956 Reviewers: yln, kubamracek, dvyukov, vitalybuka Subscribers: #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D74802 | 6 年前 | |
Add a %darwin_min_target_with_tls_support lit substitution. Summary: This substitution expands to the appropriate minimum deployment target flag where thread local storage (TLS) was first introduced on Darwin platforms. For all other platforms the substitution expands to an empty string. E.g. for macOS the substitution expands to -mmacosx-version-min=10.12 This patch adds support for the substitution (and future substitutions) by doing a minor refactor and then uses the substitution in the relevant TSan tests. rdar://problem/59568956 Reviewers: yln, kubamracek, dvyukov, vitalybuka Subscribers: #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D74802 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
tsan: add a test for vector memory accesses Add a basic test that checks races between vector/non-vector read/write accesses of different sizes/offsets in different orders. This gives coverage of __tsan_read/write16 callbacks. Depends on D114591. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D114592 | 4 年前 | |
[TSan] Mark test unsupported on Darwin | 4 年前 | |
Remove NOLINTs from compiler-rt llvm-svn: 371687 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 8 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 6 年前 | ||
| 5 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 2 年前 | ||
| 12 年前 | ||
| 3 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 10 年前 | ||
| 8 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 9 个月前 | ||
| 6 年前 | ||
| 2 年前 | ||
| 6 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 3 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 3 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 5 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 5 年前 | ||
| 12 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 9 个月前 | ||
| 6 年前 | ||
| 3 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 1 年前 | ||
| 6 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 6 年前 | ||
| 3 年前 | ||
| 6 年前 | ||
| 12 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 10 年前 | ||
| 3 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 2 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 1 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 6 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 1 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 11 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 7 年前 | ||
| 10 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 5 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 5 年前 | ||
| 6 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 4 年前 | ||
| 10 个月前 | ||
| 6 年前 | ||
| 4 年前 | ||
| 10 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 2 年前 | ||
| 6 年前 | ||
| 2 年前 | ||
| 10 年前 | ||
| 10 年前 | ||
| 6 年前 | ||
| 4 年前 | ||
| 10 年前 | ||
| 11 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 3 年前 | ||
| 6 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 5 年前 | ||
| 6 年前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 11 年前 | ||
| 6 年前 | ||
| 5 年前 | ||
| 6 年前 | ||
| 5 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 1 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 8 个月前 | ||
| 2 年前 | ||
| 10 年前 | ||
| 10 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 10 年前 | ||
| 10 年前 | ||
| 11 年前 | ||
| 10 年前 | ||
| 11 年前 | ||
| 5 年前 | ||
| 6 年前 | ||
| 11 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 6 年前 |