Alexey Samsonov
4fc8098979
[TSan] Move declarations of __tsan_atomic functions to a public header
...
llvm-svn: 197015
2013-12-11 08:18:50 +00:00
Alexey Samsonov
2d42b1d693
Run TSan/MSan lit tests only on 64-bit platforms
...
llvm-svn: 196501
2013-12-05 12:53:36 +00:00
Dmitry Vyukov
25ecfcf00c
tsan: deflake more tests
...
llvm-svn: 195916
2013-11-28 10:12:16 +00:00
Dmitry Vyukov
0fea3ad0c7
tsan: deflake more tests
...
llvm-svn: 195913
2013-11-28 09:06:55 +00:00
Dmitry Vyukov
3238e1c913
tsan: better diagnostics if thread finishes with ignores enabled
...
print thread creation stack
and stacks where ignores were enabled.
llvm-svn: 195836
2013-11-27 11:30:28 +00:00
Dmitry Vyukov
5f1a783914
tsan: deflake tests
...
the tests produce episodic flakes
the hypothesis is that it's due to our "racy" race detection algorithm
sleeps should remove the flakes
llvm-svn: 195351
2013-11-21 12:23:17 +00:00
Dmitry Vyukov
5fa72d4c3f
tsan: add -lm to output test build script
...
as common sanitizer interceptors now require it
llvm-svn: 195346
2013-11-21 11:49:08 +00:00
Kostya Serebryany
53c51a1675
[tsan] use FileCheck in race_on_speculative_load.cc
...
llvm-svn: 195331
2013-11-21 09:09:47 +00:00
Kostya Serebryany
95f3e54066
[tsan] add a run-time-side regression test for https://code.google.com/p/thread-sanitizer/issues/detail?id=40 (tsan-hostile load speculation)
...
llvm-svn: 195325
2013-11-21 07:31:12 +00:00
Dmitry Vyukov
4bbe6dc8a9
tsan: add support for robust mutexes
...
llvm-svn: 194823
2013-11-15 16:58:12 +00:00
Dmitry Vyukov
3e8432ee6c
tsan/asan: support pthread_setname_np to set thread names
...
llvm-svn: 193602
2013-10-29 10:30:39 +00:00
Dmitry Vyukov
333112a439
tsan: merge 2 similar tests into 1
...
llvm-svn: 192874
2013-10-17 08:27:24 +00:00
Dmitry Vyukov
e88dbe5774
tsan: add a test for __tsan_default_options()
...
llvm-svn: 192873
2013-10-17 08:13:38 +00:00
Dmitry Vyukov
cdc971c03c
tsan: revert variable name change in test
...
It works as is with new llvm-symbolizer.
llvm-svn: 192798
2013-10-16 15:57:23 +00:00
Dmitry Vyukov
464ebbd67b
tsan: move shadow stack from thread descriptors to fixed addresses
...
This allows to increase max shadow stack size to 64K,
and reliably catch shadow stack overflows instead of silently
corrupting memory.
llvm-svn: 192797
2013-10-16 15:35:12 +00:00
Alexey Samsonov
1fe87e031c
[TSan] Extend test for reporting globals with races on them
...
llvm-svn: 192782
2013-10-16 09:56:17 +00:00
Dmitry Vyukov
fbb194ff34
tsan: add annotations to ignore synchronization operations
...
The annotations are AnnotateIgnoreSyncBegin/End,
may be useful to ignore some infrastructure synchronization
that introduces lots of false negatives.
llvm-svn: 192355
2013-10-10 15:58:12 +00:00
Alexey Samsonov
50ec07c196
[TSan] Automatically pick up llvm-symbolizer from PATH, as we do in another sanitizers
...
llvm-svn: 191954
2013-10-04 13:38:35 +00:00
Dmitry Vyukov
5ba736457c
tsan: ignore interceptors coming from specified libraries
...
LibIgnore allows to ignore all interceptors called from a particular set
of dynamic libraries. LibIgnore remembers all "called_from_lib" suppressions
from the provided SuppressionContext; finds code ranges for the libraries;
and checks whether the provided PC value belongs to the code ranges.
Also make malloc and friends interceptors use SCOPED_INTERCEPTOR_RAW instead of
SCOPED_TSAN_INTERCEPTOR, because if they are called from an ignored lib,
then must call our internal allocator instead of libc malloc.
llvm-svn: 191897
2013-10-03 13:37:17 +00:00
Dmitry Vyukov
439a904515
tsan: support allocator_may_return_null flag
...
Fixes https://code.google.com/p/thread-sanitizer/issues/detail?id=29
llvm-svn: 191482
2013-09-27 02:31:23 +00:00
Dmitry Vyukov
150406bbf3
tsan: ignore all interceptors coming directly from JVM
...
llvm-svn: 191152
2013-09-21 23:06:00 +00:00
Dmitry Vyukov
c7547d0527
tsan: allow to ignore memory accesses in malloc and free
...
llvm-svn: 191072
2013-09-20 05:37:36 +00:00
Alexey Samsonov
4a2447fd81
[TSan] Use --whole-archive around TSan runtime in old TSan makefiles. Fix a Go build
...
llvm-svn: 190513
2013-09-11 11:06:06 +00:00
Kostya Serebryany
895ff83e47
[tsan] make calloc crash instead of returning 0 on overflow (controlled by the allocator_may_return_null flag)
...
llvm-svn: 190135
2013-09-06 11:04:14 +00:00
Dmitry Vyukov
4e27d1fdaf
tsan: catch races on condition variables
...
llvm-svn: 189816
2013-09-03 15:04:15 +00:00
Dmitry Vyukov
3a6c7cea77
tsan: properly intercept pthread_cond functions
...
llvm-svn: 189767
2013-09-02 18:06:28 +00:00
Dmitry Vyukov
97f0eae0a5
tsan/msan: add halt_on_error flag
...
If halt_on_error==true, program terminates after reporting first error.
llvm-svn: 188279
2013-08-13 15:33:00 +00:00
Rui Ueyama
633ec6848b
Add "CHECK-" prefix to un-break buildbot failure.
...
After r188221, the prefix given by --check-prefix must match with the label
as a whole. Substring is not considered to be a correct label anymore.
llvm-svn: 188227
2013-08-12 23:43:19 +00:00
Daniel Dunbar
bc5dbc435e
[tests] Update to use lit_config and lit package, as appropriate.
...
llvm-svn: 188116
2013-08-09 22:14:01 +00:00
Alexander Potapenko
0443f1ac72
[TSan] Fix free_race.c by removing `not` from the test invocation that doesn't fail.
...
llvm-svn: 187889
2013-08-07 13:54:27 +00:00
Alexander Potapenko
ce32410097
[TSan] Let the users suppress use-after-free errors using the "race:" suppressions.
...
If there's a race between a memory access and a free() call in the client program,
it can be reported as a use-after-free (if the access occurs after the free()) or an ordinary race
(if free() occurs after the access).
We've decided to use a single "race:" prefix for both cases instead of introducing a "use-after-free:" one,
because in many cases this allows us to keep a single suppression for both the use-after-free and free-after-use.
This may be misleading if the use-after-free occurs in a non-racy way (e.g. in a single-threaded program).
But normally such bugs shall not be suppressed.
llvm-svn: 187885
2013-08-07 12:39:00 +00:00
Alexey Samsonov
b6c8b3de70
Enable pipefail for TSan tests
...
llvm-svn: 187875
2013-08-07 09:02:37 +00:00
Rafael Espindola
7bc3077afb
Disable pipefail for ThreadSanitizer.
...
llvm-svn: 187272
2013-07-26 23:38:18 +00:00
Hans Wennborg
2e304b6ffd
Use --driver-mode=g++ instead of -ccc-cxx; required after Clang r186605
...
llvm-svn: 186607
2013-07-18 20:48:50 +00:00
Dmitry Vyukov
1a0c76fa55
tsan: support sigsuspend() call
...
Intercepting it makes it process pending signal before return.
llvm-svn: 186400
2013-07-16 11:28:04 +00:00
Alexey Samsonov
e71f37c1cd
Define the path to llvm-symbolizer tool in a common config to reduce copy-paste
...
llvm-svn: 185286
2013-06-30 14:47:38 +00:00
Dmitry Vyukov
5001d43dcb
tsan: make the test more robust
...
currently it episodically fails
the hypothesis it is due to racy race detection algorithm
the sleep should make it more robust
llvm-svn: 184752
2013-06-24 16:28:02 +00:00
Dmitry Vyukov
03ec9545f5
tsan: fix potential false positive race on fd
...
llvm-svn: 184430
2013-06-20 14:32:12 +00:00
Dmitry Vyukov
79de34f75c
tsan: fix lit test failures
...
llvm-svn: 183674
2013-06-10 16:06:21 +00:00
Dmitry Vyukov
b08e72913a
tsan: add system tests for suppressions
...
llvm-svn: 183673
2013-06-10 15:39:28 +00:00
Alexey Samsonov
e3bf521b7c
Remove a bunch of copy-paste: use common config for sanitizer lit/unit tests
...
llvm-svn: 183407
2013-06-06 13:28:37 +00:00
Alexey Samsonov
9c2bcf8c15
Improve support for compiler-rt tests in CMake build.
...
Now compiler-rt tests run correctly if compiler-rt is checked out into
arbitrary directory (not necessarily projects/compiler-rt).
Patch by Greg Fitzgerald!
llvm-svn: 182726
2013-05-27 09:35:24 +00:00
Dmitry Vyukov
536bff3396
tsan: detect when a thread ends with ignores enabled
...
llvm-svn: 182354
2013-05-21 08:12:35 +00:00
Dmitry Vyukov
c9af818515
tsan: introduce recursive mutex lock/unlock java interface
...
this is required to handle Object.Wait()
llvm-svn: 182088
2013-05-17 12:03:46 +00:00
Dmitry Vyukov
db7d9e5db4
tsan: comment out debug output in test
...
llvm-svn: 180787
2013-04-30 13:09:31 +00:00
Dmitry Vyukov
d0ac6c168b
tsan: fix deadlock detector table (OK to lock sync var mutex during reporting)
...
llvm-svn: 180782
2013-04-30 12:00:40 +00:00
Dmitry Vyukov
3f7bf08b12
tsan: add interface functions for unaligned access, e.g. __sanitizer_unaligned_load16
...
llvm-svn: 180780
2013-04-30 11:56:56 +00:00
Dmitry Vyukov
a05bbe1c9a
tsan: add a test that used to crash, fixed by r180180.
...
llvm-svn: 180251
2013-04-25 06:58:43 +00:00
Dmitry Vyukov
368d97e33c
tsan: fix stack traces for malloc and free
...
llvm-svn: 180184
2013-04-24 11:16:47 +00:00
Alexey Samsonov
0d725b1408
[TSan] remove -fPIE -pie from TSan lit tests to check that -fsanitize=thread implies them now
...
llvm-svn: 179365
2013-04-12 07:11:00 +00:00