Alexey Samsonov
90f9630c80
[Sanitizer]: move internal_strcmp to sanitizer_common
...
llvm-svn: 157926
2012-06-04 13:27:49 +00:00
Dmitry Vyukov
95a5c5ca4c
tsan: intercept longjmp() but die in it, greatly simplifies problem diagnostic
...
llvm-svn: 157760
2012-05-31 18:03:59 +00:00
Dmitry Vyukov
6f448700e4
tsan: fix a typo
...
llvm-svn: 157744
2012-05-31 14:24:10 +00:00
Kostya Serebryany
c5bea20e2e
[asan,tsan] rename files in sanitizer_common to have a common prefix (sanitizer_).
...
llvm-svn: 157740
2012-05-31 13:42:53 +00:00
Dmitry Vyukov
d6ffccd1da
tsan: suppress reports against source file names as well
...
llvm-svn: 157739
2012-05-31 13:18:11 +00:00
Dmitry Vyukov
92d917d91c
tsan: prevent recursive signal handlers
...
llvm-svn: 157625
2012-05-29 15:51:27 +00:00
Kostya Serebryany
458b4006b2
[asan,tsan] Add a new directory compiler-rt/lib/sanitizer_common
...
which will contain code shared between asan and tsan run-times.
Naming is hard. If you can suggest a better name for the directory -- speak up.
llvm-svn: 157611
2012-05-29 12:18:18 +00:00
Dmitry Vyukov
9bf897e696
tsan: fix compiler warnings
...
llvm-svn: 157585
2012-05-28 17:33:08 +00:00
Dmitry Vyukov
880bb6697f
tsan: fix race during pthread_join/detach
...
llvm-svn: 157584
2012-05-28 17:32:50 +00:00
Dmitry Vyukov
e1bbb2f34a
tsan: pass CFLAGS to tests
...
llvm-svn: 157579
2012-05-28 14:15:39 +00:00
Dmitry Vyukov
ed5bc02740
tsan: be more conservative wrt symbolizer output
...
llvm-svn: 157578
2012-05-28 14:14:53 +00:00
Dmitry Vyukov
d558530754
tsan: increase /proc/self/maps max size (1M is far not enough)
...
llvm-svn: 157570
2012-05-28 09:24:01 +00:00
Dmitry Vyukov
bd310f02a5
asan/tsan: rename interceptors from __xsan_xxx to __interceptor_xxx
...
llvm-svn: 157569
2012-05-28 07:47:35 +00:00
Dmitry Vyukov
ebdf670ae7
tsan: more robust detection of stack of main thread
...
llvm-svn: 157568
2012-05-28 07:46:42 +00:00
Dmitry Vyukov
3de9ca068f
tsan: use DCHECK_GT/LT instead of plain DCHECK (better diagnostics)
...
llvm-svn: 157567
2012-05-28 07:45:35 +00:00
Dmitry Vyukov
2d4e3c140f
tsan: do not clean stack/tls for main thread
...
llvm-svn: 157566
2012-05-28 07:44:34 +00:00
Dmitry Vyukov
7339eb197b
tsan: do not call into libc in symbolizer and in other code (this causes recursion and crashes)
...
llvm-svn: 157466
2012-05-25 11:15:04 +00:00
Dmitry Vyukov
e86497ee1c
tsan: output message about failure to intercept only if verbosity flag is passed
...
llvm-svn: 157465
2012-05-25 09:47:18 +00:00
Dmitry Vyukov
d1b9521e48
tsan: compilation of tests with newest clang
...
llvm-svn: 157392
2012-05-24 14:55:12 +00:00
Dmitry Vyukov
30c32a8819
tsan: fix compilation with newest clang
...
llvm-svn: 157391
2012-05-24 14:50:33 +00:00
Dmitry Vyukov
7fb7330469
asan/tsan: weak interceptors
...
The idea isthat asan/tsan can survive if user intercepts the same functions. At the same time user has an ability to call back into asan/tsan runtime. See the following tests for examples:
asan/output_tests/interception_failure_test-linux.cc
asan/output_tests/interception_test-linux.cc
asan/output_tests/interception_malloc_test-linux.cc
llvm-svn: 157388
2012-05-24 13:54:31 +00:00
Dmitry Vyukov
65c21a5e6d
tsan: add a flag to control RunningOnValgrind() return value
...
llvm-svn: 157383
2012-05-24 09:24:45 +00:00
Dmitry Vyukov
302cebb8f1
tsan: add shadow memory flush + fix few bugs
...
llvm-svn: 157270
2012-05-22 18:07:45 +00:00
Dmitry Vyukov
011a363c85
tsan: fix sizeof sigset_t
...
llvm-svn: 157268
2012-05-22 18:01:33 +00:00
Dmitry Vyukov
4d30e9b5eb
tsan: fix makefile
...
allow to build custom configurations
llvm-svn: 157259
2012-05-22 16:46:05 +00:00
Dmitry Vyukov
f6985e3ab9
tsan: reduce per-thread memory usage
...
llvm-svn: 157252
2012-05-22 14:34:43 +00:00
Dmitry Vyukov
15710c9220
tsan: simple memory profiler
...
llvm-svn: 157248
2012-05-22 11:33:03 +00:00
Dmitry Vyukov
46c1a4c25e
tsan: implement malloc/free hooks
...
llvm-svn: 157196
2012-05-21 17:39:40 +00:00
Dmitry Vyukov
99ed663a42
tsan: do not assume non-recursive signal handlers
...
llvm-svn: 157187
2012-05-21 14:24:20 +00:00
Dmitry Vyukov
163a8338be
tsan: replace CHECK with CHECK_EQ for better diagnostics
...
llvm-svn: 157181
2012-05-21 10:20:53 +00:00
Dmitry Vyukov
98953b7a6d
tsan: better, more realistic handling of signals
...
llvm-svn: 157178
2012-05-21 08:26:51 +00:00
Dmitry Vyukov
9d2229f3ca
tsan: add more checks for OOM conditions
...
tests like to try to malloc((size_t)-1)
llvm-svn: 157176
2012-05-21 06:46:27 +00:00
Dmitry Vyukov
f64046cb3d
tsan: check for overflow in malloc()
...
llvm-svn: 157048
2012-05-18 09:41:52 +00:00
Dmitry Vyukov
bea47a5029
tsan: fix potential NULL deref
...
llvm-svn: 157047
2012-05-18 08:53:16 +00:00
Dmitry Vyukov
19b855fe3e
tsan: remove shutdown code
...
tsan runtime shutdown is problematic for 2 reasons:
1. others crash during shutdown
2. we have to override user exit status (don't know it and can't return from atexit handler)
llvm-svn: 156991
2012-05-17 15:00:27 +00:00
Dmitry Vyukov
fee5b7d2e0
tsan: detect accesses to freed memory
...
http://codereview.appspot.com/6214052
llvm-svn: 156990
2012-05-17 14:17:51 +00:00
Kostya Serebryany
82bcc58384
[tsan] fix dependency rules in Makefile.old
...
llvm-svn: 156983
2012-05-17 08:33:14 +00:00
Dmitry Vyukov
352358b715
tsan: ValgrindSlowdown() should be weak for some time
...
llvm-svn: 156982
2012-05-17 08:31:47 +00:00
Dmitry Vyukov
166b8e5f33
tsan: add ValgrindSlowdown() "dynamic annotation"
...
llvm-svn: 156981
2012-05-17 08:04:41 +00:00
Dmitry Vyukov
f015a94f09
tsan: improve addr2line symbolizer
...
-provide support for non-continous modules
-ignore not loaded sections
-more debug output
llvm-svn: 156924
2012-05-16 16:40:47 +00:00
Kostya Serebryany
e263221069
[tsan] add tiny_test.c
...
llvm-svn: 156908
2012-05-16 07:48:16 +00:00
Kostya Serebryany
480922f6a1
[tsan] fix old-style makefile -- we still need them to run our tests
...
llvm-svn: 156907
2012-05-16 07:46:55 +00:00
Kostya Serebryany
c9fd917b36
[tsan] makefile machinery to build tsan-rt (linux-x86_64 only)
...
llvm-svn: 156822
2012-05-15 15:17:35 +00:00
Dmitry Vyukov
572c5b2a44
tsan: add more atomics to public interface (fetch_or/and/xor + 1-,2-byte versions)
...
llvm-svn: 156766
2012-05-14 15:33:00 +00:00
Dmitry Vyukov
665ce2a2f4
tsan: enabled report suppression for signal-unsafe reports
...
llvm-svn: 156765
2012-05-14 15:28:03 +00:00
Dmitry Vyukov
d004b99cc6
tsan: fix output_tests script to actually verify tests results
...
llvm-svn: 156764
2012-05-14 15:25:35 +00:00
Dmitry Vyukov
f5cbda29cd
tsan: make addr2line symbolizer understand dynamic libraries
...
Collect info about all dynamic libraries in the process (name, base, size).
Determine to what dyn lib the address relates, route request to addr2line instance for the lib.
llvm-svn: 156759
2012-05-14 14:38:29 +00:00
Dmitry Vyukov
fa44dc5623
tsan: update output tests to race on heap memory
...
Races on stack of main thread are problematic for COMPAT mapping, because it's not 1-to-1 and race addr is not properly mapped from shadow back to application memory.
Update output tests to race heap memory.
llvm-svn: 156758
2012-05-14 14:00:07 +00:00
Dmitry Vyukov
b078a33151
tsan: fix mmap fd
...
This is mostly to test my commit access.
Fixes fd passed to mmap(), -1 is the proper invalid fd.
llvm-svn: 156741
2012-05-13 14:24:46 +00:00
Kostya Serebryany
0e6705ec67
[tsan] run output tests in parallel
...
llvm-svn: 156617
2012-05-11 14:58:20 +00:00