Adhemerval Zanella
7a096596b2
[compiler-rt] Remove SANITIZER_AARCH64_VMA usage
...
This patch complete removed SANITIZER_AARCH64_VMA definition and usage.
AArch64 ports now supports runtime VMA detection and instrumentation
for 39 and 42-bit VMA.
It also Rewrite print_address to take a variadic argument list
(the addresses to print) and adjust the tests which uses it to the new
signature.
llvm-svn: 254319
2015-11-30 19:43:03 +00:00
Kuba Brecka
1a26ff7d17
[tsan] Fix deadlock_detector_stress_test.cc testcase for OS X
...
On OS X, we don't have pthread spinlocks, let's just use a regular mutex instead. Secondly, pthread_rwlock_t is much larger (200 bytes), so `char padding_[64 - sizeof(pthread_rwlock_t)]` actually underflows.
Differential Revision: http://reviews.llvm.org/D14862
llvm-svn: 253659
2015-11-20 11:13:36 +00:00
Kuba Brecka
153594694b
[tsan] Implement "%env_tsan_opts" substitution to inherit default TSAN_OPTIONS
...
We already have %env_asan_opts for ASan, let's implement the same for TSan.
Differential Revision: http://reviews.llvm.org/D14698
llvm-svn: 253579
2015-11-19 17:28:46 +00:00
Kostya Serebryany
94dd76aefa
[tsan] workaround for a crash in deadlock detector, bug https://github.com/google/sanitizers/issues/594
...
llvm-svn: 246592
2015-09-01 21:36:18 +00:00
Dmitry Vyukov
57f2e64c06
tsan: fix parsing of second_deadlock_stack flag
...
It was broken during flag parsing refactoring.
Enable test for the flag.
llvm-svn: 234878
2015-04-14 10:32:33 +00:00
Dmitry Vyukov
3ab6b2347e
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
2015-01-21 13:50:02 +00:00
Dmitry Vyukov
233f401c2b
tsan: make positive tests more robust
...
Add a script that is used to deflake inherently flaky tsan tests.
It is invoked from lit tests as:
%deflake %run %t
The script runs the target program up to 10 times,
until it produces a tsan warning.
llvm-svn: 209898
2014-05-30 14:08:51 +00:00
Greg Fitzgerald
b8aae5405b
Add %run to all lit tests
...
llvm-svn: 207709
2014-04-30 21:34:17 +00:00
Kostya Serebryany
432c46bf70
[sanitizer] one more stress test for the deadlock detector; this one stresses the slow path with a global lock
...
llvm-svn: 205299
2014-04-01 11:35:55 +00:00
Kostya Serebryany
3df5d87da4
[sanitizer] print threads in deadlock report
...
llvm-svn: 204461
2014-03-21 13:00:18 +00:00
Kostya Serebryany
7317d9499b
[sanitizer] more human-readable deadlock reports
...
llvm-svn: 204454
2014-03-21 11:37:43 +00:00
Dmitry Vyukov
1af191e1f4
tsan: add test for second_deadlock_stack flag
...
llvm-svn: 204240
2014-03-19 15:00:38 +00:00
Kostya Serebryany
5c0171b811
[sanitizer] a bit more informative deadlock detector report (still lots to improve)
...
llvm-svn: 204115
2014-03-18 05:56:14 +00:00
Kostya Serebryany
f01c094cdd
[sanitizer] reverse the order of the stack traces printed for every pair of locks in the deadlock report (first print the 'from' node, then print the 'to' node of the deadlock graph)
...
llvm-svn: 204043
2014-03-17 14:56:04 +00:00
Kostya Serebryany
8976539627
[sanitizer] make the deadlock detector print 2*N stack traces on lock-order-inversion with N locks (i.e. print stack traces for both lock acquisitions in every edge in the graph). More improvements to follow
...
llvm-svn: 204042
2014-03-17 14:41:36 +00:00
Kostya Serebryany
779ccf3b2c
[sanitizer] one more output test for the deadlock detector
...
llvm-svn: 204036
2014-03-17 09:32:48 +00:00
Kostya Serebryany
b9cb473fb8
[sanitizer] fix build warnings; add an output test for the deadlock detecor
...
llvm-svn: 204035
2014-03-17 09:21:41 +00:00
Kostya Serebryany
de3f20cf4b
[sanitizer] support recursive rwlocks in bitset-based deadlock detector
...
llvm-svn: 203779
2014-03-13 10:26:03 +00:00
Dmitry Vyukov
811d16c953
tsan: prevent actual deadlock in deadlock detector test
...
llvm-svn: 202502
2014-02-28 14:34:25 +00:00
Kostya Serebryany
eae464f911
[sanitizer] speedup deadlock detector for the case when we acquire the first lock in a thread
...
llvm-svn: 202492
2014-02-28 11:56:14 +00:00
Kostya Serebryany
afc4f2af76
[sanitizer] speedup deadlock detector for the case when we destroy a mutex that has never been locked
...
llvm-svn: 202487
2014-02-28 10:59:33 +00:00
Kostya Serebryany
261993ad1a
[sanitizer] a test for recursive rwlock and deadlock detector (currently fails)
...
llvm-svn: 202480
2014-02-28 10:03:51 +00:00
Kostya Serebryany
b86b56c0db
[tsan] one more test for deadlock detector
...
llvm-svn: 202476
2014-02-28 09:17:16 +00:00
Dmitry Vyukov
17ca4d06c7
tsan: 2 more deadlock detector benchmarks
...
llvm-svn: 202379
2014-02-27 12:05:17 +00:00
Dmitry Vyukov
8a0813d944
tsan: fix deadlock detector lit test output
...
llvm-svn: 202368
2014-02-27 09:18:08 +00:00
Dmitry Vyukov
511118c762
tsan: add another deadlock detector benchmark
...
llvm-svn: 202366
2014-02-27 09:05:07 +00:00
Dmitry Vyukov
794500ae4e
tsan: add recursive deadlock detector benchmark
...
llvm-svn: 202361
2014-02-27 08:33:52 +00:00
Dmitry Vyukov
c546943b6a
tsan: improve deadlock detector test
...
- allow to specify which test to run
- allow to specify number of iterations
- specify number of threads required in the test itself
llvm-svn: 202358
2014-02-27 08:04:20 +00:00
Dmitry Vyukov
0f34a3ba8c
tsan: fix deadlock detector test so that it does not force contention in runtime
...
llvm-svn: 202278
2014-02-26 17:06:58 +00:00
Kostya Serebryany
67968cbf93
[sanitizer] minimal support for recursive locks indeadlock detector
...
llvm-svn: 202153
2014-02-25 14:02:01 +00:00
Alexey Samsonov
98aa08c0e9
Update sanitizers' bash scripts.
...
* Fix bash scripts to work on FreeBSD (patch by Viktor Kutuzov)
* Update locations of lit tests in check_lint script.
llvm-svn: 202145
2014-02-25 12:09:25 +00:00
Kostya Serebryany
01be296dbb
[sanitizer] support pthread_rwlock_rd* in deadlock detector
...
llvm-svn: 202132
2014-02-25 10:33:37 +00:00
Kostya Serebryany
fd88edfddb
[sanitizer] partially support pthread_rwlock_* (no rd* form yet)
...
llvm-svn: 202128
2014-02-25 09:33:10 +00:00
Kostya Serebryany
8f240ec03f
[tsan] add deadlock detector tests for pthread_spin_lock
...
llvm-svn: 202123
2014-02-25 08:42:34 +00:00
Kostya Serebryany
11f4f30fa7
[sanitizer] add support for try_lock in deadlock detector
...
llvm-svn: 202120
2014-02-25 08:24:15 +00:00
Kostya Serebryany
d77dfcb384
[tsan] one more test for deadlock detector
...
llvm-svn: 202026
2014-02-24 11:45:47 +00:00
Kostya Serebryany
0548c79859
[tsan] add coarse-grained lock around the DeadlockDetector. We can do better than that, but that's a start.
...
llvm-svn: 201861
2014-02-21 15:07:18 +00:00
Kostya Serebryany
699b975014
[tsan] improve the test that checks for lock inversion with 3 locks
...
llvm-svn: 201676
2014-02-19 14:24:31 +00:00
Kostya Serebryany
b51f8d4990
[tsan] when printing a mutex, also print its address. Properly print the deadlock report.
...
llvm-svn: 201675
2014-02-19 14:17:25 +00:00
Kostya Serebryany
37ce26cb16
[sanitizer] when reporting a deadlock also report the lock cycle
...
llvm-svn: 201576
2014-02-18 14:56:19 +00:00
Kostya Serebryany
bd86a29a2a
[sanitizer] make sure the deadlock detector survives the change of epochs; add a test and a comment
...
llvm-svn: 201572
2014-02-18 13:41:49 +00:00
Kostya Serebryany
aa416c39cd
[tsan] in deadlock detector do not register locks on their creation and unregister them on destruction; added a relevant test
...
llvm-svn: 201568
2014-02-18 12:50:31 +00:00
Kostya Serebryany
67bf8bd124
[tsan] one more lit test for deadlock detector; more to come
...
llvm-svn: 201554
2014-02-18 09:08:03 +00:00