DDmitry Vyukovtsan: remove tracking of racy addresses
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[TSan][Darwin] Deflake test The asserted order of THREAD_DESTROY and end of main() is not guaranteed: 7: Hello from pthread 8: THREAD_TERMINATE 0x7e8000104000, self: 0x7e8000104000, name: child thread 9: Done. 10: THREAD_DESTROY 0x7e8000104000, self: 0x7e8000104000, name: child thread Resulting in: error: CHECK: expected string not found in input // CHECK: Done. Remove checking for "Done." (end of main()) to deflake this test. Alternatively, we could use CHECK-DAG. rdar://94036145 | 4 年前 | |
[TSAN] Disable clone_setns test case on PPC64 RHEL 7.9 Targets The compler-rt test case tsan/Linux/clone_setns.cpp fails on PowerPC64 RHEL 7.9 targets. Unshare fails with errno code EINVAL. It is unclear why this happens specifically on RHEL 7.9 and no other operating system like Ubuntu 18 or RHEL 8.4 for example. This patch uses marcos to disable the test case for ppc64 rhel7.9 because there are no XFAIL directives to target rhel 7.9 specifically. Reviewed By: dvyukov Differential Revision: https://reviews.llvm.org/D130086 | 3 年前 | |
[Darwin] Limit parallelism for sanitizer tests that use shadow memory on AS On Darwin, we want to limit the parallelism during test execution for sanitizer tests that use shadow memory. The reason is explained by this existing comment: > Only run up to 3 processes that require shadow memory simultaneously > on 64-bit Darwin. Using more scales badly and hogs the system due to > inefficient handling of large mmap'd regions (terabytes) by the > kernel. Previously we detected 3 cases: * on-device: limit to 1 process * 64-bit: macOS & simulators, limit to 3 processes * others (32-bit): no limitation We checked for the 64-bit case like this: if arch in ['x86_64', 'x86_64h'] which misses macOS running on AS. Additionally, we don't care about 32-bit anymore, so I've simplified this to 2 cases: on-device and everything else. Differential Revision: https://reviews.llvm.org/D122751 | 4 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
[compiler-rt] Fix issue with compiler-rt tests mixing <atomic> and <stdatomic.h> Since D97044, libc++ implements <stdatomic.h>, which is not compatible with the <atomic> header in C++03 mode. To fix the tests, avoid using <stdatomic.h> at all, since it is not strictly required. rdar://92867529 Differential Revision: https://reviews.llvm.org/D125118 | 4 年前 | |
Revert "[CMake][compiler-rt] Clean up the use of libcxx and libcxxabi" This reverts commit 4164cfa537e545f8ea9bc4f3c8b913867a7ac79d since it broke the clang-x86_64-debian-fast builder: https://lab.llvm.org/buildbot/#/builders/109/builds/41339 | 3 年前 | |
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 年前 | |
Add %run to all lit tests llvm-svn: 207709 | 11 年前 | |
compiler-rt: Rename .cc file in lib/tsan/rtl to .cpp Like r367463, but for tsan/rtl. llvm-svn: 367564 | 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] 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: 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 年前 | |
Revert "Mark tsan cxa_guard_acquire test as unsupported on Darwin" This reverts commit 593275c93c5cd3e02819f012f812eee19081911b. This test now passes again. | 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: don't instrument runtime callbacks in tests These runtime callbacks are supposed to be non-instrumented, we can't handle runtime recursion well, nor can we afford explicit recursion checks in the hot functions (memory access, function entry/exit). It used to work (not crash), but it won't work with the new runtime. Mark all runtime callbacks as non-instrumented. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D111157 | 4 年前 | |
[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 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
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 年前 | |
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 年前 | |
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 年前 | |
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 年前 | |
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 年前 | |
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 年前 | |
Revert "sanitizer_common: split LibIgnore into fast/slow paths" This reverts commit 1e1f7520279c93a59fa6511028ff40412065985e. It breaks ignore_noninstrumented_modules=1. Somehow we did not have any portable tests for this mode before (only Darwin tests). Add a portable test as well. Moreover, I think I was too fast uninlining all LibIgnore checks. For Java, Darwin and OpenMP LibIgnore is always enabled, so it makes sense to leave it as it was before. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D106855 | 4 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
[TSan] Build ignore_lib{0,1,5} tests with -fno-builtin These tests depend on TSan seeing the intercepted memcpy(), so they break when the compiler chooses the builtin version. Reviewed By: dvyukov Differential Revision: https://reviews.llvm.org/D105629 | 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] Build ignore_lib{0,1,5} tests with -fno-builtin These tests depend on TSan seeing the intercepted memcpy(), so they break when the compiler chooses the builtin version. Reviewed By: dvyukov Differential Revision: https://reviews.llvm.org/D105629 | 4 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
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 年前 | |
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 年前 | |
[NFC, tsan] Update tsan tests expectation Summary: These tests pass with clang, but fail if gcc was used. gcc build creates similar but not the same stacks. Reviewers: vitalybuka Reviewed By: vitalybuka Subscribers: dvyukov, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D78114 | 6 年前 | |
[NFC, tsan] Update tsan tests expectation Summary: These tests pass with clang, but fail if gcc was used. gcc build creates similar but not the same stacks. Reviewers: vitalybuka Reviewed By: vitalybuka Subscribers: dvyukov, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D78114 | 6 年前 | |
[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: print alloc stack for Java objects We maintain information about Java allocations, but for some reason never printed it in reports. Print it. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D106956 | 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: disable java_finalizer2 test on darwin pthread_barrier_t is not supported on darwin. Do what other tests that use pthread_barrier_t do. | 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 年前 | |
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 年前 | |
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 Java heap block begin in reports We currently use a wrong value for heap block (only works for C++, but not for Java). Use the correct value (we already computed it before, just forgot to use). Depends on D114593. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D114595 | 4 年前 | |
tsan: don't instrument runtime callbacks in tests These runtime callbacks are supposed to be non-instrumented, we can't handle runtime recursion well, nor can we afford explicit recursion checks in the hot functions (memory access, function entry/exit). It used to work (not crash), but it won't work with the new runtime. Mark all runtime callbacks as non-instrumented. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D111157 | 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] Revert removal of ignore_interceptors_accesses flag This flag suppresses TSan FPs on Darwin. I removed this flag prematurely and have been dealing with the fallout ever since. This commit puts back the flag, reverting 7d1085cb [1]. [1] https://reviews.llvm.org/D55075 | 5 年前 | |
[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] Adjust tests for SystemZ XFAIL map32bit, define the maximum possible allocation size in mmap_large.cpp. Reviewed By: dvyukov Differential Revision: https://reviews.llvm.org/D105629 | 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] Adjust tests for SystemZ XFAIL map32bit, define the maximum possible allocation size in mmap_large.cpp. Reviewed By: dvyukov Differential Revision: https://reviews.llvm.org/D105629 | 4 年前 | |
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 | 4 年前 | |
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 | 4 年前 | |
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 | 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: 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 | 9 年前 | |
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 年前 | |
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 年前 | |
[TSan] Allow test contents to be copied before execution Allow test contents to be copied before execution by using %ld_flags_rpath_so, %ld_flags_rpath_exe, and %dynamiclib substitutions. rdar://76302416 Differential Revision: https://reviews.llvm.org/D100240 | 5 年前 | |
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 年前 | |
[tsan] Deflake pthread_atfork_deadlock3 sleep(1) does not guaranty afterfork order. Also relative child/parent afterfork order is not important for this test so we can just avoid checking that. Reviewed By: dvyukov Differential Revision: https://reviews.llvm.org/D102810 | 5 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
[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 年前 | |
Rename tsan/race_range_pc.cc to test/tsan/race_range_pc.cpp. The old suffix was preventing it from being executed by default. | 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 年前 | |
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 年前 | |
[powerpc] mark setuid.c and setuid2.c as unsupported setuid(0) hangs on powerpc64 big endian. When this is fixed remove the unsupported flag. https://llvm.org/bugs/show_bug.cgi?id=25799 llvm-svn: 262814 | 10 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
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 年前 | |
tsan: print signal num in errno spoiling reports For errno spoiling reports we only print the stack where the signal handler is invoked. And the top frame is the signal handler function, which is supposed to give the info for debugging. But in same cases the top frame can be some common thunk, which does not give much info. E.g. for Go/cgo it's always runtime.cgoSigtramp. Print the signal number. This is what we can easily gather and it may give at least some hints regarding the issue. Reviewed By: melver, vitalybuka Differential Revision: https://reviews.llvm.org/D121979 | 4 年前 | |
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 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
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 年前 | |
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: disable signal_sync2.cpp test on powerpc64 Fails 1 out of 10 runs on powerpc bots: https://lab.llvm.org/buildbot/#/builders/121/builds/13391 Reviewed By: nemanjai Differential Revision: https://reviews.llvm.org/D114426 | 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: 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 年前 | |
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 年前 | |
compiler-rt: Rename .cc file in test/tsan to .cpp Like r367463, but for test/tsan. llvm-svn: 367656 | 6 年前 | |
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 年前 | |
[sanitizer][sancov] Use pc-1 for s390x The stack trace addresses may be odd (normally addresses should be even), but seems a good compromise when the instruction length (2,4,6) cannot be detected easily. Reviewed By: uweigand Differential Revision: https://reviews.llvm.org/D120432 | 4 年前 | |
[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] Remove debug logging and disable test on ppc64be llvm-svn: 353624 | 7 年前 | |
[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 年前 |