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
Alexey Samsonov
9f3938e271
Explicitly list all sanitizer headers in CMake build rules. Make sure sanitizer lit_tests depend on fresh headers.
...
llvm-svn: 179293
2013-04-11 15:49:52 +00:00
Alexey Samsonov
7ad129277e
[Sanitizer] fix TSan tests: remove global ctor from sanitizer_common, run load_shared_lib test only in lit
...
llvm-svn: 179090
2013-04-09 07:46:20 +00:00
Kostya Serebryany
9d28efc1ad
[asan] relax Linux/zero-base-shadow.cc to make it pass on newer Ubuntu; fix lint
...
llvm-svn: 179088
2013-04-09 07:08:05 +00:00
Alexander Potapenko
32efd25b93
[libsymbolized] If we can't find an address in the list of shared libraries, try to reload it.
...
Add a regression test for the case where such behavior helps TSan:
1. race is reported in the main module
2. new shared library is loaded
3. race is reported in the shared library
llvm-svn: 179032
2013-04-08 17:46:34 +00:00
Alexander Potapenko
bbfc722e46
[TSan] Add the WTFAnnotateBenignRaceSized implementation and a test for
...
WTFAnnotateBenignRaceSized and AnnotateBenignRaceSized.
llvm-svn: 178534
2013-04-02 11:21:53 +00:00
Kostya Serebryany
3e73c84050
[tsan] a test checking that memset/memcpy/memmove are not inlined in tsan mode
...
llvm-svn: 178231
2013-03-28 11:21:50 +00:00
Kostya Serebryany
ac83282665
[tsan] don't use -fno-builtin for tests; add a test for a false negative bug (inlined memcpy is not instrumented)
...
llvm-svn: 178228
2013-03-28 08:41:49 +00:00
Alexey Samsonov
f903a9ee6e
[TSan] Fixup for r178128: verify that TSan indeed doesn't report race
...
llvm-svn: 178129
2013-03-27 10:22:51 +00:00
Alexey Samsonov
059e61f8b0
[TSan] Run test output through FileCheck
...
llvm-svn: 178128
2013-03-27 09:25:06 +00:00
Kostya Serebryany
79a6e189b0
[tsan] make memcpy_race.cc test immune to memcpy inlining
...
llvm-svn: 178011
2013-03-26 12:42:18 +00:00