Evgeniy Stepanov
8a4e24ea8b
[sanitizer] Intercept getnameinfo.
...
llvm-svn: 185338
2013-07-01 13:51:31 +00:00
Alexey Samsonov
8918140809
Hide mlock/munlock info message under verbosity flag.
...
llvm-svn: 185314
2013-07-01 08:25:29 +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
Richard Smith
079fe209f5
Fix typo found by Clang fix for extern "C" function handling.
...
llvm-svn: 185234
2013-06-28 22:28:37 +00:00
Evgeniy Stepanov
dec0f76c14
[sanitizer] Intercept ptrace.
...
llvm-svn: 185142
2013-06-28 11:02:43 +00:00
Dmitry Vyukov
d2cd2d018f
tsan: revert dynamic symbols file to the old incorrect one
...
full proper list of dynamic symbols crashes old gold (see bug 16468).
the culprit is 'memcpy' function, if it's added to syms file, gold crashes
llvm-svn: 185078
2013-06-27 13:56:37 +00:00
Dmitry Vyukov
b7c6f49364
tsan: remove non-existent functions from syms file
...
llvm-svn: 185077
2013-06-27 13:52:50 +00:00
Alexey Samsonov
ecdcf11bd6
[TSan] try to fix Go build
...
llvm-svn: 185063
2013-06-27 07:57:53 +00:00
Sergey Matveev
0b2ffe30e4
[tsan] Fix build.
...
llvm-svn: 184963
2013-06-26 16:49:34 +00:00
Sergey Matveev
d109eb052b
[tsan] Move some suppressions-related code to common.
...
Factor out code to be reused in LSan. Also switch from linked list to vector.
llvm-svn: 184957
2013-06-26 15:37:14 +00:00
Evgeniy Stepanov
06d6c25141
[sanitizer] readdir and readdir_r interceptors.
...
llvm-svn: 184950
2013-06-26 15:00:53 +00:00
Dmitry Vyukov
eb95448245
tsan: add missing __attribute__((visibility("default"))) to interface functions
...
llvm-svn: 184858
2013-06-25 15:36:25 +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
b4711b2c24
tsan: update dynamic export syms file
...
now it includes proper functions (including interceptors)
and does not include local functions that lead to build failures
llvm-svn: 184747
2013-06-24 15:17:36 +00:00
Evgeniy Stepanov
60d964d4f2
[sanitizer] Intercept sysinfo.
...
llvm-svn: 184739
2013-06-24 14:25:33 +00:00
Evgeniy Stepanov
8fb2c264a2
[sanitizer] Fix TSan build.
...
llvm-svn: 184736
2013-06-24 14:03:13 +00:00
Evgeniy Stepanov
0e8053af08
[sanitizer] Intercept readv, preadv, writev, pwritev.
...
llvm-svn: 184717
2013-06-24 10:43:23 +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
5cf581a8d4
tsan: consistently use return pc as top frame pc
...
always substract 1 from the top pc
this allows to get correct stacks with -O2
llvm-svn: 184112
2013-06-17 19:57:03 +00:00
Alexey Samsonov
0d7012debb
[TSan] use InternalMmapVector to store fired suppressions
...
llvm-svn: 183974
2013-06-14 11:18:58 +00:00
Dmitry Vyukov
26daccaddb
tsan: fix Windows Go crash
...
llvm-svn: 183898
2013-06-13 10:15:44 +00:00
Dmitry Vyukov
a8570d38fe
tsan: add -Wno-maybe-uninitialized to Go build script
...
this is how the rest of the codebase is built
llvm-svn: 183738
2013-06-11 11:44:43 +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
Dmitry Vyukov
315bb0e687
tsan: allows to suppress races on global variables
...
llvm-svn: 183672
2013-06-10 15:38:44 +00:00
Dmitry Vyukov
b19a26b852
tsan: disable getaddrinfo() interceptor for tsan (causes recursion)
...
llvm-svn: 183649
2013-06-10 11:35:08 +00:00
Dmitry Vyukov
ddb0294dd8
tsan: fix old gcc warnings
...
llvm-svn: 183645
2013-06-10 10:30:19 +00:00
Dmitry Vyukov
8794772337
tsan: more detailed trace for atomic operations (include address and memory ordering)
...
llvm-svn: 183643
2013-06-10 10:01:31 +00:00
Evgeniy Stepanov
0b1f41b6f4
[sanitizer] ioctl interceptor.
...
ASan: disabled by default
MSan: enabled by default
TSan: disabled
llvm-svn: 183517
2013-06-07 13:00:47 +00:00
Dmitry Vyukov
0fffc0088c
tsan: use memory access size for Go after all
...
helps to make range access functions correct and fast
llvm-svn: 183418
2013-06-06 14:31:15 +00:00
Dmitry Vyukov
5fe8a4f88f
tsan: always strip bottom frame in Go reports
...
llvm-svn: 183408
2013-06-06 13:31:35 +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
Dmitry Vyukov
c9e304afbd
tsan: fix darwin Go build
...
llvm-svn: 183402
2013-06-06 13:00:32 +00:00
Evgeniy Stepanov
56050e8f69
[sanitizer] Fix __sanitizer_unaligned_* to work with unaligned data types.
...
llvm-svn: 183224
2013-06-04 13:49:10 +00:00
Evgeniy Stepanov
fc708db4c1
[sanitizer] Intercept getpeername.
...
llvm-svn: 182844
2013-05-29 11:49:25 +00:00
Evgeniy Stepanov
a4d08c4e87
[sanitizer] Move TSan and MSan recvmsg interceptors to common.
...
llvm-svn: 182843
2013-05-29 11:30:00 +00:00
Dmitry Vyukov
2b997d2914
tsan: match "race" suppressions against "race on vptr" reports
...
llvm-svn: 182842
2013-05-29 11:23:54 +00:00
Evgeniy Stepanov
f28217ad0e
[sanitizer] modf/modff/modfl interceptors.
...
llvm-svn: 182838
2013-05-29 10:03:11 +00:00
Alexey Samsonov
75289297af
Exclude sanitizer_nolibc_test from TSan test run. Fix lint warnings
...
llvm-svn: 182837
2013-05-29 09:40:07 +00:00
Alexey Samsonov
c30e2d6b3a
Make InternalAlloc/InternalFree in sanitizer runtimes libc-free by switching to a custom allocator.
...
llvm-svn: 182836
2013-05-29 09:15:39 +00:00
Evgeniy Stepanov
08f662845d
[sanitizer] Share TSan accept & accept4 interceptors with other sanitizers.
...
llvm-svn: 182835
2013-05-29 09:09:58 +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
Alexander Potapenko
22e92fa954
[TSan] Try to fix the Go-TSan build.
...
llvm-svn: 182582
2013-05-23 12:54:35 +00:00
Evgeniy Stepanov
bfbd37e6e7
[tsan] Remove -Wgnu from Makefile.old.
...
llvm-svn: 182580
2013-05-23 11:57:47 +00:00
Evgeniy Stepanov
b978627cb8
[sanitizer] Intercept getsockopt.
...
llvm-svn: 182574
2013-05-23 11:38:08 +00:00
Evgeniy Stepanov
ab25369d04
[sanitizer] Interceptors for gethostbyname and friends.
...
llvm-svn: 182573
2013-05-23 11:10:23 +00:00
Evgeniy Stepanov
97aea34b54
[msan] Intercept getsockname.
...
llvm-svn: 182475
2013-05-22 13:46:22 +00:00
Evgeniy Stepanov
bfd2122b20
[msan] getaddrinfo & nested interceptor support.
...
Multiple connected changes:
- Ignore reads from nested interceptors.
- Check shadow on reads from common interceptors.
- getaddrinfo interceptor.
llvm-svn: 182466
2013-05-22 12:50:26 +00:00
Peter Collingbourne
8575195772
[nolibc] Move libc-dependent sanitizer_posix.cc code to sanitizer_posix_libcdep.cc.
...
llvm-svn: 182366
2013-05-21 10:27:07 +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
Evgeniy Stepanov
970be35808
[sanitizer] Intercept pthread_getschedparam.
...
llvm-svn: 182353
2013-05-21 08:12:08 +00:00
Peter Collingbourne
0c8df4e1d8
[nolibc] Move libc-dependent sanitizer_linux.cc code to sanitizer_linux_libcdep.cc.
...
llvm-svn: 182292
2013-05-20 15:57:44 +00:00
Peter Collingbourne
ffaf2eac4d
[nolibc] Move all platforms to internal_getpid.
...
Before, we had an unused internal_getpid function for Linux, and a
platform-independent GetPid function. To make the naming conventions
consistent for syscall-like functions, the GetPid syscall wrapper
in sanitizer_posix.cc is moved to sanitizer_mac.cc, and GetPid is
renamed to internal_getpid, bringing the Linux variant into use.
llvm-svn: 182132
2013-05-17 16:56:53 +00:00
Peter Collingbourne
6d4a7d3723
[nolibc] Begin moving sanitizer_common's libc-dependent code to a separate library
...
Introduce a new object library, RTSanitizerCommonLibc, which will contain
the subset of sanitizer_common with libc dependencies. RTSanitizerCommon
contains the remainder of sanitizer_common, and is intended to have no
libc dependencies. Begin moving code to RTSanitizerCommonLibc, starting
with sanitizer_common.cc, whose libc-dependent portion is moved to
sanitizer_common_libcdep.cc, the first member of the new library.
This split affects the CMake build only. The makefile build continues
to produce the full sanitizer_common library.
llvm-svn: 182118
2013-05-17 16:17:19 +00:00
Dmitry Vyukov
9ff1023816
tsan: remove "printing report from signal handler. Can crash or hang" output
...
it was added to debug mysterious hangs, but it does not seem to happen anymore
now it only clutter up output
llvm-svn: 182089
2013-05-17 12:05:44 +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
Evgeniy Stepanov
f1efb256f6
Add sanitizer syscall hooks to the tool's export lists.
...
llvm-svn: 181790
2013-05-14 13:55:21 +00:00
Peter Collingbourne
6f4be19b57
[nolibc] Change internal syscall API to remove reliance on libc's errno.
...
This change moves to a model where the error value of a system call is
potentially contained in the return value itself rather than being
implicit in errno. The helper function internal_iserror can be used
to extract the error value from a return value. On platforms other
than Linux/x86_64 this still uses errno, but other platforms are free
to port their error handling to this new model.
Differential Revision: http://llvm-reviews.chandlerc.com/D756
llvm-svn: 181436
2013-05-08 14:43:49 +00:00
Sergey Matveev
954c6ef10f
[sanitizer] Move GetThreadStackAndTls from TSan to sanitizer_common.
...
Move this function to sanitizer_common because LSan uses it too. Also, fix a bug
where the TLS range reported for main thread was off by the size of the thread
descriptor from libc (TSan doesn't care much, but for LSan it's critical).
llvm-svn: 181322
2013-05-07 14:41:43 +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
56cf378071
tsan: reverse stack trace for failed CHECK's, this is how we print traces in other places
...
llvm-svn: 180781
2013-04-30 11:57:32 +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
Dmitry Vyukov
7a8535d2f2
tsan: run tests sequentially otherwise cmake says:
...
make[3]: make[3]: /bin/sh: ../../../../../bin/clang: Text file busy
llvm-svn: 180183
2013-04-24 11:07:25 +00:00
Dmitry Vyukov
beaf786151
tsan: disable getpwuid_r() and glob64() interceptors under tsan, because they cause interceptor recursion if user intercepts fopen()
...
llvm-svn: 180182
2013-04-24 11:06:05 +00:00
Dmitry Vyukov
54d9c81082
tsan: fix crash when data race happens on out-of-bounds accesses.
...
llvm-svn: 180180
2013-04-24 09:20:25 +00:00
Dmitry Vyukov
c63d73e59d
tsan: support heap starting at 0x04c0 (used in some custom deplyments)
...
llvm-svn: 180116
2013-04-23 15:59:56 +00:00
Dmitry Vyukov
43cf90f4d1
tsan: update Go memory mapping, Go now uses 0x00c0 heap base
...
llvm-svn: 180113
2013-04-23 15:24:26 +00:00
Evgeniy Stepanov
44b75efab4
[sanitizer] Intercept inet_pton and inet_ntop.
...
llvm-svn: 180107
2013-04-23 14:05:15 +00:00
Evgeniy Stepanov
3076ba0a08
[sanitizer] Intercept getgrnam{_r}, getgrgid{_r}.
...
llvm-svn: 180091
2013-04-23 12:01:20 +00:00
Alexey Samsonov
6021e94774
[TSan] Allocate fd table in user heap instead of using internal allocator. We need this to catch races on fds.
...
llvm-svn: 179841
2013-04-19 08:04:46 +00:00
Evgeniy Stepanov
755eb32a39
[sanitizer] Add syscall handlers to ASan and TSan runtimes.
...
ASan checks addressability of syscall arguments. TSan does nothing for now.
llvm-svn: 179380
2013-04-12 14:57:03 +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
Evgeniy Stepanov
460067823b
[sanitizer] Interceptors for wait*.
...
llvm-svn: 179096
2013-04-09 14:34:59 +00:00
Evgeniy Stepanov
69967c2835
[msan] Intercept glob() with tests.
...
llvm-svn: 179091
2013-04-09 11:35:13 +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
Chandler Carruth
2b3c00eec7
Revert r179012: "[msan] Intercept glob()."
...
This was committed without tests and contains obvious bugs. That's not
acceptable. It broke address sanitizer for most programs using glob(3).
llvm-svn: 179054
2013-04-08 20:59:44 +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
Evgeniy Stepanov
8cd707a1a6
[msan] Intercept glob().
...
llvm-svn: 179012
2013-04-08 09:03:00 +00:00
Evgeniy Stepanov
e20c780aaf
[tsan] Fix build.
...
llvm-svn: 179008
2013-04-08 08:46:25 +00:00
Alexey Samsonov
734aab4066
[Sanitizer] Use a common mutex to prevent mixing reports from different sanitizers. This fixes PR15516
...
llvm-svn: 178853
2013-04-05 07:30:29 +00:00
Alexey Samsonov
70a9c263d4
[TSan] Make path to FileCheck configurable
...
llvm-svn: 178760
2013-04-04 12:18:12 +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
Evgeniy Stepanov
f8213b4eb3
[sanitizer] More interceptors.
...
getpwnam, getpwuid, getpwnam_r, getpwuid_r, clock_getres, clock_gettime,
clock_settime, getitimer, setitimer, sigaction (MSan).
llvm-svn: 178465
2013-04-01 14:47:21 +00:00
Kostya Serebryany
91952cda76
[tsan] restore performance critical inlining in tsan: remove static from ALWAYS_INLINE, use ALWAYS_INLINE USED for critical functions.
...
llvm-svn: 178341
2013-03-29 09:44:16 +00:00
Alexander Potapenko
b042555cd3
[TSan] Build TSan runtime with -fPIE.
...
This removes all register spills from the performance-critical __tsan_{read,write}{1,2,4,8} functions when the host compiler is GCC.
llvm-svn: 178340
2013-03-29 09:44:11 +00:00
Timur Iskhodzhanov
23411d9a95
Band-aid fix for the TSan RTL build
...
llvm-svn: 178298
2013-03-28 22:23:03 +00:00
Timur Iskhodzhanov
07d06d7cf5
Remove all 'static' before ALWAYS_INLINE
...
llvm-svn: 178290
2013-03-28 21:16:09 +00:00
Timur Iskhodzhanov
a6788325cf
Make all the ALWAYS_INLINE users Windows-friendly; also, avoid ALWAYS_INLINE INLINE combinations
...
llvm-svn: 178266
2013-03-28 18:52:40 +00:00
Dmitry Vyukov
f2cbda4082
tsan: print statistics about benign race annotations
...
(total count, unique, matched) if requested with print_benign=1
flag.
llvm-svn: 178245
2013-03-28 16:21:19 +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
Dmitry Vyukov
b365d40415
tsan: print matched suppressions if print_suppressions=1 flag is provided
...
llvm-svn: 178159
2013-03-27 17:59:57 +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
Dmitry Vyukov
6f4b34bcf4
asan/tsan: move strcasecmp() interceptor to sanitizer_common
...
llvm-svn: 178010
2013-03-26 12:40:23 +00:00
Alexander Potapenko
f8109dd0f8
[libsanitizer] Unmapping the old cache partially invalidates the memory layout, so add
...
a flag to skip cache update for cases when that's unacceptable (e.g. lsan).
Patch by Sergey Matveev (earthdok@google.com )
llvm-svn: 178000
2013-03-26 10:34:37 +00:00
Kostya Serebryany
4d7efba66e
[tsan] add a test for aligned-vs-unaligned race (tsan's false negative)
...
llvm-svn: 177996
2013-03-26 08:31:02 +00:00
Alexey Samsonov
31a2c483ed
[TSan] Build TSan unit tests with the same compile flags as TSan runtime
...
llvm-svn: 177859
2013-03-25 10:23:20 +00:00
Dmitry Vyukov
4adf49d253
tsan: intercept setjmp/longjmp
...
llvm-svn: 177858
2013-03-25 10:10:44 +00:00
Richard Smith
c91e327cba
Build and install .syms files alongside sanitizer runtimes. These are used to
...
specify which symbols are exported to DSOs when the sanitizer is statically
linked into a binary.
llvm-svn: 177784
2013-03-23 00:31:07 +00:00
Dmitry Vyukov
9af68719ed
tsan: return 0 on malloc() failure instead of crashing
...
llvm-svn: 177741
2013-03-22 17:06:22 +00:00
Dmitry Vyukov
3bd5ffb62b
tsan: test that tsan explicitly says "race on vptr".
...
Requires llvm r177717.
llvm-svn: 177726
2013-03-22 10:54:39 +00:00
Dmitry Vyukov
2f411641fe
tsan: work around FileCheck bug with empty outputs
...
llvm-svn: 177715
2013-03-22 08:48:34 +00:00
Dmitry Vyukov
ebf63d0095
tsan: better reporting of thread leaks
...
1. do not report running threads as leaks
2. aggregate leaked threads by creation stack
llvm-svn: 177647
2013-03-21 16:55:17 +00:00
Dmitry Vyukov
0851fa8819
tsan: better reporting for races on vptr
...
explicitly say "ctor/dtor vs virtual call"
llvm-svn: 177640
2013-03-21 15:37:39 +00:00
Dmitry Vyukov
2c3b919ad3
tsan: add flag to control symbolizer flush frequency
...
llvm-svn: 177638
2013-03-21 13:01:50 +00:00
Dmitry Vyukov
69c323d66f
tsan: intercept abort() to fflush() libc streams
...
llvm-svn: 177637
2013-03-21 12:50:43 +00:00
Dmitry Vyukov
6911a7f1d1
tsan: remove bogus CHECK
...
Asynchronous signal (e.g. SIGABRT) can be received with any value of in_rtl.
llvm-svn: 177636
2013-03-21 12:44:44 +00:00
Dmitry Vyukov
48e5d4a2d3
tsan: flush symbolizer cache if not symbolized for more than 5 seconds
...
llvm-svn: 177629
2013-03-21 07:02:36 +00:00
Dmitry Vyukov
5e797a8e57
tsan: add a comment about magic numbers
...
llvm-svn: 177628
2013-03-21 06:28:04 +00:00
Dmitry Vyukov
78693730a4
tsan: use a single background thread for memory profiler and memory flush (and later for symbolizer flush)
...
llvm-svn: 177627
2013-03-21 06:24:31 +00:00
Dmitry Vyukov
6120bac6e6
tsan: correct sizes of signal-related data structures
...
llvm-svn: 177526
2013-03-20 14:57:28 +00:00
Dmitry Vyukov
9f94dff7a6
tsan: add missing stat descriptions
...
llvm-svn: 177523
2013-03-20 14:04:23 +00:00
Dmitry Vyukov
0954e9c01d
tsan: call fflush(0) on exit again
...
llvm-svn: 177522
2013-03-20 14:01:10 +00:00
Dmitry Vyukov
c638a7127e
tsan: reduce size of mutexsets from 64 to 16 mutexes
...
overflow is handled anyway
saves memory because each thread holds 1024 mutexsets
llvm-svn: 177520
2013-03-20 13:50:47 +00:00
Dmitry Vyukov
3330200d92
tsan: fix incorrect test
...
llvm-svn: 177519
2013-03-20 13:49:45 +00:00
Dmitry Vyukov
b62c158d81
tsan: special handling of .rodata (don't try to find races, don't keep shadow, dont' put into traces)
...
llvm-svn: 177517
2013-03-20 13:21:50 +00:00
Dmitry Vyukov
ccbdea956f
tsan: fix build
...
llvm-svn: 177513
2013-03-20 11:22:03 +00:00
Dmitry Vyukov
79915de6af
tsan: move trace header into 0x600000000000 range
...
eliminat thread "dead info" altogether
llvm-svn: 177512
2013-03-20 10:31:53 +00:00
Dmitry Vyukov
b7c68ee856
tsan: fix flaky test
...
llvm-svn: 177500
2013-03-20 09:22:13 +00:00
Dmitry Vyukov
f6c4a7a2f5
tsan: fix incorrect test
...
llvm-svn: 177499
2013-03-20 09:21:49 +00:00
Evgeniy Stepanov
95eaa21637
[sanitizer] More renamed macros.
...
llvm-svn: 177401
2013-03-19 14:54:17 +00:00
Evgeniy Stepanov
0af672326a
[sanitizer] Replace more platform checks with SANITIZER_ constants.
...
llvm-svn: 177400
2013-03-19 14:33:38 +00:00
Dmitry Vyukov
4ecfa696e0
tsan: flush dead thread info earlier (when another thread is finished rather than new thread is created)
...
llvm-svn: 177394
2013-03-19 12:25:48 +00:00
Dmitry Vyukov
9dd06ad47a
tsan: instruct malloc() to consume less memory
...
llvm-svn: 177393
2013-03-19 12:24:19 +00:00
Dmitry Vyukov
f3fde82667
tsan: symbolizer "flush caches" support
...
llvm-svn: 177389
2013-03-19 10:24:01 +00:00
Dmitry Vyukov
509dab30ae
tsan: fix memory leak
...
llvm-svn: 177387
2013-03-19 10:22:33 +00:00
Evgeniy Stepanov
b4a218db34
[sanitizer] Don't adjust the size of the user-allocated stack.
...
Moved this code to sanitizer_common.
llvm-svn: 177383
2013-03-19 09:30:52 +00:00
Dmitry Vyukov
b59fa875ad
tsan: do not allocate sync vars on relaxed atomic operations
...
helps to reduce memory consumption if an atomic is used only with relaxed ops (stats)
llvm-svn: 177381
2013-03-19 09:15:31 +00:00
Dmitry Vyukov
4ddd37ba5b
tsan: smaller memory block headers (32b->16b)
...
llvm-svn: 177312
2013-03-18 19:47:36 +00:00
Dmitry Vyukov
61ce9560d4
tsan: add support for idle threads
...
llvm-svn: 177292
2013-03-18 17:21:15 +00:00
Dmitry Vyukov
ce26a0aa92
tsan: touch less shadow memory during operations on big memory ranges
...
greatly reduces memory consumption
llvm-svn: 177289
2013-03-18 16:56:48 +00:00
Dmitry Vyukov
2e7f29f042
tsan: mark shadow for thread stack as "don't need" when thread exits
...
llvm-svn: 177288
2013-03-18 15:49:07 +00:00
Dmitry Vyukov
f123337275
tsan: better memory profiler
...
llvm-svn: 177286
2013-03-18 13:55:33 +00:00
Dmitry Vyukov
15bee188c4
tsan: madvise(DONTNEED) shadow memory on munmap()
...
llvm-svn: 177278
2013-03-18 11:51:51 +00:00
Dmitry Vyukov
20bf8c7778
tsan: move implementation out of h file
...
llvm-svn: 177269
2013-03-18 10:32:21 +00:00
Dmitry Vyukov
49e462fab2
tsan: fix clang -Wall build
...
Clang does not like classes with virtual functions but w/o virtual dtor.
Go does not like libstdc++ (operator delete).
llvm-svn: 177267
2013-03-18 10:10:15 +00:00
Alexey Samsonov
b5d10f69e4
[TSan] re-apply r177249 lost in edits
...
llvm-svn: 177265
2013-03-18 09:45:22 +00:00
Dmitry Vyukov
a1bdd2d942
tsan: fix memory leak
...
llvm-svn: 177262
2013-03-18 09:09:41 +00:00
Dmitry Vyukov
7cd2025c4d
tsan: use StackDepot for thread creation stacks
...
llvm-svn: 177261
2013-03-18 09:02:27 +00:00
Dmitry Vyukov
50160030e1
tsan: fix Go build
...
llvm-svn: 177260
2013-03-18 08:52:46 +00:00
Dmitry Vyukov
a221620b2e
tsan: use StackDepot in sync object to store creation stacks
...
llvm-svn: 177258
2013-03-18 08:27:47 +00:00
Alexey Samsonov
cbed82ea70
[TSan] fix undefined variable in debug TSan build
...
llvm-svn: 177249
2013-03-18 07:33:00 +00:00
Alexey Samsonov
4f1c8a13d5
[TSan] Use ThreadRegistry::FindThreadContextLocked() to find thread by its stack/tls address.
...
llvm-svn: 177248
2013-03-18 07:02:08 +00:00
Alexey Samsonov
e1955b851d
[TSan] Makefiles: allow configurable paths to clang and FileCheck. Add -fno-rtti flag.
...
llvm-svn: 177247
2013-03-18 07:00:36 +00:00
Alexey Samsonov
9aecdfe34d
[TSan] Switch TSan runtime to use ThreadRegistry class from sanitizer_common
...
llvm-svn: 177154
2013-03-15 13:48:44 +00:00
Evgeniy Stepanov
231894a902
[sanitizer] Intercept frexp and friends.
...
llvm-svn: 177056
2013-03-14 11:34:39 +00:00
Alexey Samsonov
41a560b8cd
[TSan] Add missing header inclusion
...
llvm-svn: 177013
2013-03-14 07:13:00 +00:00
Alexey Samsonov
109ddd0fe4
[TSan] Use __sanitizer_pthread_attr_t in TSan
...
llvm-svn: 177012
2013-03-14 07:10:52 +00:00
Alexey Samsonov
d7ab381f53
[Sanitizer] Build ASan, TSan and MSan runtimes with -fno-rtti.
...
llvm-svn: 176940
2013-03-13 09:18:30 +00:00
Evgeniy Stepanov
5697b58ec4
[sanitizer] Move GetTlsSize code from TSan to sanitizer_common.
...
llvm-svn: 176938
2013-03-13 08:19:53 +00:00
Alexey Samsonov
06d3aa4884
[Sanitizer] Change MemoryMappingLayout methods to also report memory protection flags (for future use in leak checker). Patch by Sergey Matveev.
...
llvm-svn: 176931
2013-03-13 06:51:02 +00:00
Kostya Serebryany
01a32bdef1
[tsan] enable tsan-vs-gvn test since it is now fixed
...
llvm-svn: 176079
2013-02-26 08:18:27 +00:00
Alexey Samsonov
85f0a7e644
[TSan] Add interceptor for malloc_usable_size()
...
llvm-svn: 176013
2013-02-25 08:43:10 +00:00
Alexey Samsonov
10bccda948
[TSan] remove temporary build directory in 'make clean' command
...
llvm-svn: 176012
2013-02-25 08:32:02 +00:00
Evgeniy Stepanov
ea61d08185
[sanitizer] Add interceptors for localtime and friends.
...
llvm-svn: 175499
2013-02-19 09:19:16 +00:00
Kostya Serebryany
3e62fe8c23
[tsan] use our own GetEnv instead of libc's getenv
...
llvm-svn: 175498
2013-02-19 08:19:13 +00:00
Dmitry Vyukov
965a10e07c
tsan: fix bug in suppression reading (suppressions from file were discarded)
...
llvm-svn: 175153
2013-02-14 11:03:45 +00:00
Kostya Serebryany
aa7f2b5aa6
[tsan] disable a failing test until it gets fixed. fix lint
...
llvm-svn: 175137
2013-02-14 06:54:51 +00:00
Dmitry Vyukov
3c2489e2c3
tsan: do not imitate memory write on malloc() (Go)
...
better memory range access functions (put only 1 event to trace) (Go)
llvm-svn: 175056
2013-02-13 13:05:36 +00:00
Kostya Serebryany
4681fbf002
[tsan] simplify tsan-vs-gvn test since gvn vs tsan is now fixed; fix lint
...
llvm-svn: 175037
2013-02-13 06:07:50 +00:00
Evgeniy Stepanov
d8cfb99a71
[sanitizer] Missing changes from r174960.
...
llvm-svn: 174962
2013-02-12 12:02:49 +00:00
Kostya Serebryany
53e37ef74f
[tsan] added tsan-vs-gvn test
...
llvm-svn: 174875
2013-02-11 11:28:03 +00:00
Dmitry Vyukov
e679798315
tsan: fix suppress_java logic
...
llvm-svn: 174635
2013-02-07 17:12:28 +00:00
Dmitry Vyukov
effd98b0f4
tsan: intercept libc __res_iclose
...
this is required to catch close of file descriptors created in getaddrinfo()
llvm-svn: 174624
2013-02-07 15:27:45 +00:00
Dmitry Vyukov
e94f4c048e
tsan: fix Go build
...
llvm-svn: 174622
2013-02-07 15:26:55 +00:00
Kostya Serebryany
df2f0bff37
[tsan] race_on_write test
...
llvm-svn: 174599
2013-02-07 09:48:17 +00:00
Alexey Samsonov
85cc9b655d
[TSan] skip multiple internal frames, if necessary
...
llvm-svn: 174516
2013-02-06 16:28:05 +00:00
Kostya Serebryany
21bedab7a1
[tsan] improve FrameIsInternal
...
llvm-svn: 174506
2013-02-06 14:32:16 +00:00
Kostya Serebryany
4fb340d972
[tsan] print error summary line
...
llvm-svn: 174505
2013-02-06 14:24:00 +00:00
Alexander Potapenko
34157fc33f
[ASan] Delete the code related to static runtime on OS X.
...
Nuke lib/interception/mach_override.
llvm-svn: 174383
2013-02-05 15:57:12 +00:00
Alexey Samsonov
2c5cbd2b38
[Sanitizer] extend internal libc with stat/fstat/lstat functions
...
llvm-svn: 174316
2013-02-04 10:16:50 +00:00
Dmitry Vyukov
606de60163
tsan: intercept bind/listen
...
llvm-svn: 174311
2013-02-04 08:06:32 +00:00
Alexey Samsonov
39313b780d
[Sanitizer] make internal_open have the same interface as libc version
...
llvm-svn: 174187
2013-02-01 15:58:46 +00:00
Dmitry Vyukov
1fab680c1b
tsan: catch races on fd in more cases
...
llvm-svn: 174184
2013-02-01 15:52:35 +00:00
Alexey Samsonov
84cf6a4333
[TSan] remove artifacts from gotsan build in 'make clean' command
...
llvm-svn: 174180
2013-02-01 15:30:36 +00:00
Dmitry Vyukov
87c6bb9716
tsan: even if races between atomic and plain memory accesses are turned off (report_atomic_races=0),
...
still report races between atomic accesses and free().
llvm-svn: 174175
2013-02-01 14:41:58 +00:00
Dmitry Vyukov
628df38e95
tsan: say that the memory access is atomic in reports
...
llvm-svn: 174168
2013-02-01 11:10:53 +00:00
Dmitry Vyukov
aa6af4ddd1
tsan: remember 2 stack frames for atomics (caller and atomic itself)
...
llvm-svn: 174167
2013-02-01 11:01:17 +00:00
Dmitry Vyukov
52f0e4e1a0
tsan: add flag to not report races between atomic and plain memory accesses
...
llvm-svn: 174165
2013-02-01 10:06:56 +00:00
Dmitry Vyukov
71242b064e
tsan: flip is_write bit in shadow to is_read
...
this makes calculation of interesting predicates faster
llvm-svn: 174164
2013-02-01 10:02:55 +00:00
Dmitry Vyukov
ba4291480d
tsan: detect races between plain and atomic memory accesses
...
llvm-svn: 174163
2013-02-01 09:42:06 +00:00
Kostya Serebryany
bda64b4d40
[sanitizer] make the error messages from sanitizer_common contain the actual tool name
...
llvm-svn: 174059
2013-01-31 14:11:21 +00:00
Dmitry Vyukov
6f4a6ab5d6
tsan: switch to explicit thread contexts in Go (instead of monotonic goroutine ids)
...
llvm-svn: 174047
2013-01-31 07:48:43 +00:00
Dmitry Vyukov
6095285d0b
tsan: do not check for intersecting memory accesses in Go (all accesses are 1 byte)
...
llvm-svn: 174046
2013-01-31 07:47:58 +00:00
Dmitry Vyukov
087efd23d6
tsan: fix CPP_WEAK definition (it must be the other way around)
...
llvm-svn: 173932
2013-01-30 14:38:44 +00:00
Alexey Samsonov
32832e6176
[Sanitizer] include sanitizer_common headers when building interception library
...
llvm-svn: 173930
2013-01-30 14:27:41 +00:00
Evgeniy Stepanov
358698279d
[sanitizer] Further split private and public sanitizer headers.
...
And make msan_interface.h C-compatible.
llvm-svn: 173928
2013-01-30 13:12:08 +00:00
Alexey Samsonov
0d92533b29
Use LLVM_BUILD_TYPE instead of CMAKE_BUILD_TYPE in compiler-rt unit tests to match the behavior of llvm unittests
...
llvm-svn: 173926
2013-01-30 12:18:49 +00:00
Dmitry Vyukov
d6b9348bf3
tsan: introduce a helped macro CPP_WEAK (Go linker does not support weak symbols)
...
llvm-svn: 173917
2013-01-30 09:46:53 +00:00
Dmitry Vyukov
5fbfafcd8c
tsan: add OnFinalize() callback for frontends
...
llvm-svn: 173915
2013-01-30 09:24:00 +00:00
Alexey Samsonov
a1eb11f915
[TSan] relax output tests a bit to make them pass in gcc build
...
llvm-svn: 173913
2013-01-30 08:41:57 +00:00
Alexey Samsonov
49a32c1d08
[Sanitizer] update style checker script and fix namespace style warnings
...
llvm-svn: 173910
2013-01-30 07:45:58 +00:00
Will Dietz
25abfe49e1
[tsan] Fix checks for siginfo_t in tests
...
llvm-svn: 173815
2013-01-29 18:29:34 +00:00