Dmitry Vyukov
e993dac233
tsan: fix int overflow and several instances where tid is used with ignore
...
llvm-svn: 169029
2012-11-30 20:02:11 +00:00
Dmitry Vyukov
d05418eac6
tsan: suppress weird race reports when JVM is embed into the process
...
llvm-svn: 169019
2012-11-30 17:45:53 +00:00
Dmitry Vyukov
1450ac6406
tsan: add __libc_memalign interceptor (used by dynamic loader to allocate tls for dlopen'ed modules)
...
llvm-svn: 169017
2012-11-30 17:27:58 +00:00
Dmitry Vyukov
71d759d392
tsan: intercept mlock() because of the kernel bug
...
llvm-svn: 168987
2012-11-30 06:50:15 +00:00
Dmitry Vyukov
0a4d875c48
tsan: fix bug that leads to spurious use-after-free reports
...
llvm-svn: 168985
2012-11-30 06:39:01 +00:00
Dmitry Vyukov
4a48553869
tsan: explicitly say that failed to restore the stack
...
llvm-svn: 168790
2012-11-28 13:30:06 +00:00
Dmitry Vyukov
eb3d36e649
tsan: address several review comments
...
llvm-svn: 168789
2012-11-28 13:01:32 +00:00
Dmitry Vyukov
3374e3f874
tsan: add log_path parameter (similar to asan)
...
remove old log_fileno
llvm-svn: 168788
2012-11-28 12:56:52 +00:00
Dmitry Vyukov
e1a7f338a3
tsan: dynamic history size
...
introduces history_size parameter that can be used to control trace size at startup
llvm-svn: 168786
2012-11-28 12:19:50 +00:00
Dmitry Vyukov
00e4604d6b
tsan: change fast state layout in preparation to dynamic traces
...
llvm-svn: 168784
2012-11-28 10:49:27 +00:00
Dmitry Vyukov
2429b02770
tsan: move traces from tls into dedicated storage at fixed address
...
helps to reduce tls size (it's weird to have multi-MB tls)
will help with dynamically adjustable trace size
llvm-svn: 168783
2012-11-28 10:35:31 +00:00
Dmitry Vyukov
05d7ade34d
tsan: add description of memory layouts in different configs
...
llvm-svn: 168777
2012-11-28 07:44:26 +00:00
Dmitry Vyukov
ec8da99846
tsan: fix macro mess
...
llvm-svn: 168697
2012-11-27 12:51:16 +00:00
Dmitry Vyukov
69a071d5a6
tsan: fix compilation for dead old compilers (why we are supporting them at all?..)
...
llvm-svn: 168693
2012-11-27 09:35:44 +00:00
Dmitry Vyukov
210c21129e
tsan: add memory range access functions to public iface
...
llvm-svn: 168692
2012-11-27 08:41:39 +00:00
Dmitry Vyukov
59d58665ee
tsan: add 128-bit atomic operations
...
llvm-svn: 168683
2012-11-27 07:41:27 +00:00
Dmitry Vyukov
10362c46f1
tsan: refactor atomic operations implementation
...
do the atomic operation under the sync object mutex
make acquire/release sync atomic with the operation itself
combine acquire and release into a single acq_rel operation
llvm-svn: 168682
2012-11-27 07:25:50 +00:00
Dmitry Vyukov
20678e2b68
tsan: explicitly mark symbols referenced from assembly as hidden
...
this allows to build tsan runtime as dynamic library
llvm-svn: 168589
2012-11-26 14:20:26 +00:00
Dmitry Vyukov
3b4501254f
tsan: add atomic nand operation
...
llvm-svn: 168584
2012-11-26 09:42:56 +00:00
Dmitry Vyukov
ce7a1ba196
tsan: faster memory reset for Go
...
llvm-svn: 168567
2012-11-25 16:05:42 +00:00
Kostya Serebryany
df198db1aa
[asan/tsan] get rid of kPageSize completely in favor of GetPageSizeCached(). This makes the code friendly to more platforms
...
llvm-svn: 168537
2012-11-24 05:03:11 +00:00
Dmitry Vyukov
195eda9922
tsan: add failure memory order to atomic compare exchange functions
...
llvm-svn: 168518
2012-11-23 15:51:45 +00:00
Kostya Serebryany
f22c697f58
[asan] get rid of some of the uses of kPageSize. The intent is to get rid of it completely to support platforms with multiple possible page sizes.
...
llvm-svn: 168517
2012-11-23 15:38:49 +00:00
Dmitry Vyukov
db584aded7
tsan: ensure than func entry/exit are inlined
...
llvm-svn: 168506
2012-11-23 07:14:11 +00:00
Dmitry Vyukov
6971414f3e
tsan: fix more bugs in signal handling
...
llvm-svn: 168497
2012-11-22 13:53:54 +00:00
Dmitry Vyukov
3048e1a399
tsan: add missing \n in report
...
llvm-svn: 168496
2012-11-22 13:38:28 +00:00
Dmitry Vyukov
aeed45cde0
tsan: explictly say when we fail to restore a stack trace
...
llvm-svn: 168423
2012-11-21 11:44:20 +00:00
Dmitry Vyukov
9ca2afd3a1
tsan: fix handling of signals
...
(do not execute synchronous signals in recursive interceptors)
llvm-svn: 168421
2012-11-21 11:12:33 +00:00
Alexey Samsonov
4ac66c49da
[TSan] use explicit ctor for BlockingCall
...
llvm-svn: 168150
2012-11-16 11:21:07 +00:00
Alexey Samsonov
038e3489d9
[TSan] use llvm-symbolizer to run tsan tests
...
llvm-svn: 168146
2012-11-16 10:16:14 +00:00
Dmitry Vyukov
933c9889aa
tsan: remove unused parameter
...
llvm-svn: 168060
2012-11-15 18:49:08 +00:00
Dmitry Vyukov
f34db58c20
tsan: switch to 4 shadow cells by default (since that's what we use everywhere now)
...
llvm-svn: 168059
2012-11-15 18:44:22 +00:00
Dmitry Vyukov
262465c126
tsan: eevn better handling of signals
...
add interceptor for poll()
in addition process signals in every atomic op
in addition process signals in blocking libc functions
llvm-svn: 168050
2012-11-15 17:40:49 +00:00
Dmitry Vyukov
6d67d3b0ee
tsan: remove unused const
...
llvm-svn: 167835
2012-11-13 14:13:21 +00:00
Dmitry Vyukov
041eaf976c
tsan: better function names
...
llvm-svn: 167834
2012-11-13 14:05:58 +00:00
Alexey Samsonov
b8a5f99bee
[TSan] Add output test for write under reader lock
...
llvm-svn: 167833
2012-11-13 14:05:02 +00:00
Dmitry Vyukov
dcba4d1288
tsan: fix stats collection
...
llvm-svn: 167832
2012-11-13 13:53:43 +00:00
Dmitry Vyukov
317f39290d
tsan: intercept gettimeofday()
...
llvm-svn: 167630
2012-11-09 19:55:06 +00:00
Alexey Samsonov
ae9b18b607
[Sanitizer] add sanity checks for communication with external symbolizer
...
llvm-svn: 167617
2012-11-09 14:45:30 +00:00
Dmitry Vyukov
805006b0ab
tsan: switch to new memory_order constants (ABI compatible)
...
llvm-svn: 167614
2012-11-09 14:11:51 +00:00
Dmitry Vyukov
4e5f72d380
tsan: add __tsan_atomicX_compare_exchange_val() function
...
It's easier to call from compiler module.
llvm-svn: 167611
2012-11-09 12:54:37 +00:00
Dmitry Vyukov
26216e4ae3
tsan: add range access functions for Go
...
llvm-svn: 167580
2012-11-08 13:38:45 +00:00
Dmitry Vyukov
e829b6231a
tsan: change TSAN_OPTIONS->GORACE in build script as well
...
llvm-svn: 167578
2012-11-08 13:23:13 +00:00
Dmitry Vyukov
9952b674ca
tsan: use GORACE env for options for Go
...
llvm-svn: 167575
2012-11-08 11:32:40 +00:00
Dmitry Vyukov
67dc5702f8
tsan: do not sleep at exit if there are no other threads
...
llvm-svn: 167533
2012-11-07 16:41:57 +00:00
Dmitry Vyukov
ea4f1990e1
tsan: add flag to suppress all reports (useful for benchmarking)
...
llvm-svn: 167532
2012-11-07 16:14:12 +00:00
Dmitry Vyukov
e11f2920c9
tsan: more precise handling of finalizers
...
llvm-svn: 167530
2012-11-07 15:08:20 +00:00
Dmitry Vyukov
da78be74f3
tsan: slightly relax requirements for lazy shadow memory (can overlap and may not be properly aligned)
...
it's problematic on windows where allocation granularity is much larger than page size
llvm-svn: 167466
2012-11-06 16:48:46 +00:00
Dmitry Vyukov
c015712992
tsan: lazily allocate shadow for Go
...
llvm-svn: 167464
2012-11-06 16:00:16 +00:00
Dmitry Vyukov
95b9a362ff
tsan: fix compiler warning
...
llvm-svn: 167458
2012-11-06 14:05:20 +00:00
Dmitry Vyukov
e4c2fd4c2f
tsan: windows platform support
...
llvm-svn: 167457
2012-11-06 13:35:02 +00:00
Dmitry Vyukov
7234a5b54d
tsan: update script to support windows
...
llvm-svn: 167456
2012-11-06 13:32:53 +00:00
Dmitry Vyukov
5f93416c94
tsan: add shadow mapping for windows
...
llvm-svn: 167455
2012-11-06 13:26:57 +00:00
Dmitry Vyukov
ee563c10c6
tsan: add missing function for windows
...
llvm-svn: 167454
2012-11-06 13:25:05 +00:00
Dmitry Vyukov
1d4120b210
tsan: fix constant types
...
llvm-svn: 167453
2012-11-06 13:21:06 +00:00
Dmitry Vyukov
ba827dfdae
tsan: don't release disabled clocks
...
llvm-svn: 167451
2012-11-06 13:16:25 +00:00
Dmitry Vyukov
1ec08f3627
tsan: fix Go build
...
llvm-svn: 167446
2012-11-06 12:46:26 +00:00
Richard Smith
77930919ad
Update compiler-rt tests to match flag renaming/deprecation in Clang.
...
llvm-svn: 167434
2012-11-06 02:31:42 +00:00
Alexey Samsonov
008274440a
[Sanitizer] move unit test for Printf from tsan to sanitizer_common
...
llvm-svn: 167296
2012-11-02 12:36:11 +00:00
Alexey Samsonov
ad9d65feb8
[TSan] finally remove TsanPrintf in favor of Printf from sanitizer_common
...
llvm-svn: 167294
2012-11-02 12:17:51 +00:00
Alexey Samsonov
20ba98fdb1
[Sanitizer] Use kStderrFd constant instead of hardcoded 2
...
llvm-svn: 167291
2012-11-02 09:38:47 +00:00
Alexey Samsonov
0c8b755839
Flag -ccc-clang-cxx was removed in r166986, remove it from compiler-rt lit configs
...
llvm-svn: 167010
2012-10-30 10:06:42 +00:00
Dmitry Vyukov
19ba50a8b9
tsan: better message about found races for Go ThreadSanitizer
...
llvm-svn: 165376
2012-10-07 14:21:24 +00:00
Dmitry Vyukov
90c9cbfed4
tsan: cache pc's that cause suppressions (this way we do not need to symbolize the reports)
...
llvm-svn: 165317
2012-10-05 15:51:32 +00:00
Dmitry Vyukov
6d5bd599c2
tsan for Go: support mallocs before __tsan_init() (required to support cgo code)
...
llvm-svn: 165229
2012-10-04 13:54:49 +00:00
Dmitry Vyukov
b96a7b5aa5
tsan: add atomic_fetch_sub() and atomic_signal_fence() functions
...
llvm-svn: 165218
2012-10-04 10:08:23 +00:00
Dmitry Vyukov
be6878365d
tsan: prepare for migration to new memory_order enum values (ABI compatible)
...
llvm-svn: 165106
2012-10-03 13:00:13 +00:00
Dmitry Vyukov
56faa551b9
tsan: fix mac build
...
llvm-svn: 165004
2012-10-02 12:58:14 +00:00
Dmitry Vyukov
a2c1c7a78e
tsan: wait for pending reports before exit
...
llvm-svn: 164999
2012-10-02 12:07:16 +00:00
Dmitry Vyukov
27d5b37c38
tsan: output tid's in reports
...
llvm-svn: 164998
2012-10-02 11:52:05 +00:00
Dmitry Vyukov
0c40a5600c
tsan: run output tests in parallel
...
llvm-svn: 164997
2012-10-02 11:51:40 +00:00
Evgeniy Stepanov
f7f616ba66
Quick fix data/bss detection in TSan.
...
The old way breaks when a module's bss is adjacent to the [heap] vm area.
Both ways are not very reliable, though.
llvm-svn: 164772
2012-09-27 13:20:40 +00:00
Alexey Samsonov
b6879ce94c
[TSan] move replacement for new/delete back into tsan_interceptors
...
llvm-svn: 164764
2012-09-27 09:50:19 +00:00
Alexey Samsonov
789d4b2cd0
[TSan] fork external symbolizer before starting internal threads
...
llvm-svn: 164600
2012-09-25 12:35:47 +00:00
Alexey Samsonov
351d486df0
[TSan] one more attempt to fix sleep_sync test: call sleep in the spawned thread so that sleep-synchronization will be detected even if child thread is started late.
...
llvm-svn: 164488
2012-09-24 13:35:46 +00:00
Alexey Samsonov
313014694f
[TSan] Provide replacements for operators new/delete instead of declaring extern C functions with weirdly mangled names (same strategy is used in ASan).
...
llvm-svn: 164487
2012-09-24 13:19:47 +00:00
Alexey Samsonov
0659f72f7b
[TSan] increase sleep time in test to ensure correct event ordering
...
llvm-svn: 164483
2012-09-24 08:57:41 +00:00
Michael J. Spencer
c774095d44
[CMake][tsan] Compile .S files for tsan as C instead of CXX.
...
Using CXX breaks if you add -stdlib=libc++ to CMAKE_CXX_FLAGS.
llvm-svn: 164422
2012-09-21 22:39:39 +00:00
Dmitry Vyukov
8d8639bc55
tsan: fix gcc4.2.1 warning
...
llvm-svn: 164200
2012-09-19 04:45:14 +00:00
Dmitry Vyukov
c7bcaf8512
tsan: fix Go build
...
llvm-svn: 164198
2012-09-19 04:39:36 +00:00
Alexey Samsonov
848abbd236
[TSan] s/uintptr_t/intptr_t in TSan test and enforce stack size limit in one of TSan output tests that somewhy fails otherwise
...
llvm-svn: 164116
2012-09-18 09:09:35 +00:00
Alexey Samsonov
3040830fcd
[TSan] fix a typo in test dependencies. Silence few remaining pedantic gcc warnings in TSan tests.
...
llvm-svn: 164115
2012-09-18 08:33:37 +00:00
Alexey Samsonov
341e5bcb45
[TSan] port all output tests to lit and move them to lit_tests directory. This makes 'make check-tsan' command test both unit and output TSan tests. Old custom makefiles for running TSan tests are still functional as well.
...
llvm-svn: 164110
2012-09-18 07:23:54 +00:00
Alexey Samsonov
0fa3ea69e2
[TSan] move: rtl_tests->tests/rtl unit_tests->tests/unit to make a single root for gtest-based tests. Support running these tests from lit via check-tsan command.
...
llvm-svn: 164022
2012-09-17 10:02:17 +00:00
Alexey Samsonov
ff3f173e87
[TSan] If we detect an unlimited stack, try to re-exec with limited stack
...
llvm-svn: 164021
2012-09-17 09:14:11 +00:00
Dmitry Vyukov
40c19aaf84
tsan: increase internal memory block limit 1GB->4GB
...
llvm-svn: 164011
2012-09-17 03:18:45 +00:00
Alexey Samsonov
2b8de6a753
[TSan] support building TSan unittests in CMake
...
llvm-svn: 163797
2012-09-13 14:04:57 +00:00
Alexey Samsonov
a7df554138
[TSan] fix a typo in CMakeLists
...
llvm-svn: 163796
2012-09-13 14:02:40 +00:00
Alexey Samsonov
f0aa9148a2
[TSan] Use interface attribute for weak functions that may be overriden by user
...
llvm-svn: 163795
2012-09-13 13:34:09 +00:00
Alexey Samsonov
255f6a5f1a
[TSan] Add initial support for buidling ThreadSanitizer runtime library with CMake (currently the only supported platfrom is 64-bit Linux). This patch makes 'clang++ -fthread-sanitizer' work for both clang in the build tree and installed clang
...
llvm-svn: 163789
2012-09-13 12:18:41 +00:00
Alexey Samsonov
046248c509
[TSan] fix a bunch of warnings reported by pedantic gcc
...
llvm-svn: 163788
2012-09-13 11:54:41 +00:00
Alexander Potapenko
ab7a4ea485
Revert the lockf() support.
...
llvm-svn: 163614
2012-09-11 11:59:05 +00:00
Alexey Samsonov
5c6b93bc33
[Sanitizer] Get rid of dependency between sanitizer_common and asan/tsan runtimes: implement tool-specific Die and CheckFailed functions via callbacks
...
llvm-svn: 163603
2012-09-11 09:44:48 +00:00
Alexander Potapenko
1a471772b0
Interceptors for lockf and lockf64, minor calloc() fix.
...
llvm-svn: 163602
2012-09-11 09:26:35 +00:00
Dmitry Vyukov
7ea4c2ccfb
tsan: ignore destruction of global mutexes (causes a lot of non-interesting reports)
...
llvm-svn: 163400
2012-09-07 18:08:02 +00:00
Dmitry Vyukov
23ecb4acd9
tsan: fix code style
...
llvm-svn: 163326
2012-09-06 16:11:30 +00:00
Dmitry Vyukov
c87e7280b8
tsan: increase max shadow stack size + reduce memory consumption at the same time (by not memorizing full stacks in traces)
...
llvm-svn: 163322
2012-09-06 15:18:14 +00:00
Dmitry Vyukov
50d49238a6
tsan: fix Go build script
...
llvm-svn: 163320
2012-09-06 15:10:19 +00:00
Alexey Samsonov
fdff4a8e0b
[TSan] add support for running external symbolizer other than addr2line (for testing purposes)
...
llvm-svn: 163297
2012-09-06 08:48:43 +00:00
Alexey Samsonov
ceffb021c5
[Sanitizer] Remove implicit conversion of InternalScopedBuffer<T> to T*
...
llvm-svn: 163197
2012-09-05 07:23:44 +00:00
Dmitry Vyukov
49dd68ae7c
tsan: do not crash with obscure message if a user passes invalid arguments to malloc/free/memset/etc
...
llvm-svn: 163092
2012-09-02 12:04:51 +00:00
Dmitry Vyukov
b7f1852140
tsan: insert cfi directives into assembly (not fully working for now, though)
...
llvm-svn: 163090
2012-09-02 11:24:07 +00:00
Dmitry Vyukov
72cddf33d9
tsan: more robust current thread stack restoration
...
llvm-svn: 163089
2012-09-02 11:23:39 +00:00
Dmitry Vyukov
46ca1fb404
tsan: better diagnostics for mutex misuse
...
llvm-svn: 163060
2012-09-01 12:13:18 +00:00
Dmitry Vyukov
cbc303006c
tsan: fix crash when users pass insane mutex addresses in dynamic annotations
...
llvm-svn: 163016
2012-08-31 20:02:33 +00:00
Dmitry Vyukov
318f77749e
tsan: add "as if synchronized via sleep" feature
...
llvm-svn: 163006
2012-08-31 17:27:49 +00:00
Dmitry Vyukov
bead8f1e3f
tsan: slightly optimize mutex unlock
...
llvm-svn: 162995
2012-08-31 13:42:28 +00:00
Dmitry Vyukov
6f6ba43271
tsan: more precise handling of atomic_store(memory_order_release)
...
llvm-svn: 162994
2012-08-31 13:22:13 +00:00
Alexey Samsonov
de827cb42b
[Sanitizer] Remove lint checkers from our old makefiles in favor of buildbot
...
llvm-svn: 162981
2012-08-31 08:10:28 +00:00
Alexey Samsonov
66ca36a564
[TSan] Fix style warinings in output test
...
llvm-svn: 162980
2012-08-31 08:00:37 +00:00
Alexey Samsonov
c3a8119a41
Whitespace/lint
...
llvm-svn: 162909
2012-08-30 14:22:21 +00:00
Dmitry Vyukov
7af8a3a83d
tsan: simplify TSAN_HISTORY_SIZE code
...
llvm-svn: 162905
2012-08-30 13:29:11 +00:00
Dmitry Vyukov
191f2f7cdb
tsan: use stack depot to describe heap blocks
...
llvm-svn: 162902
2012-08-30 13:02:30 +00:00
Kostya Serebryany
4310fe35ea
[tsan] fix tsan's Makefile.old -- our build bot still uses it (hopefully, will soon migrate to cmake completely)
...
llvm-svn: 162832
2012-08-29 08:21:09 +00:00
Alexey Samsonov
cc62211fbf
[Sanitizer] Rename ProcessMaps to MemoryMappingLayout and fix Windows build by providing stub implementation
...
llvm-svn: 162671
2012-08-27 13:48:48 +00:00
Dmitry Vyukov
0481ae4722
tsan: allow to override per-thread event trace size
...
useful if you don't see the second stack trace
llvm-svn: 162456
2012-08-23 18:26:03 +00:00
Alexey Samsonov
75e5fc3e57
[TSan] switch tsan to using InternalScopedBuffer from sanitizer_common
...
llvm-svn: 162351
2012-08-22 07:25:52 +00:00
Dmitry Vyukov
e59bed4e8a
tsan: proper handling of linker initialized mutexes
...
llvm-svn: 162169
2012-08-18 11:49:00 +00:00
Dmitry Vyukov
e2b5b5c4ac
tsan: Non-executable stack for hand-coded assembly
...
llvm-svn: 162112
2012-08-17 18:05:28 +00:00
Dmitry Vyukov
9f143c5c5f
tsan: improve Go report format + fix build
...
llvm-svn: 162042
2012-08-16 19:36:45 +00:00
Dmitry Vyukov
77196efb1e
tsan: add flag to disable reporting of destruction of locked mutexes (some programs use that on a regular basis)
...
llvm-svn: 162024
2012-08-16 15:12:35 +00:00
Dmitry Vyukov
3482ec3bc8
tsan: better diagnostics for destroy of a locked mutex + a test
...
llvm-svn: 162022
2012-08-16 15:08:49 +00:00
Dmitry Vyukov
19ae9f3b2e
tsan: support for linker initializer mutexes with static storage duration
...
llvm-svn: 162021
2012-08-16 14:21:09 +00:00
Dmitry Vyukov
5c45dab649
tsan: fix COMPAT shadow mapping once again
...
llvm-svn: 162020
2012-08-16 14:20:45 +00:00
Dmitry Vyukov
4723e6b1e5
tsan: implement RWLOCK annotations
...
llvm-svn: 162019
2012-08-16 13:29:41 +00:00
Dmitry Vyukov
f77c6ea7ea
tsan: fix COMPAT shadow mapping for new memory allocator
...
llvm-svn: 162018
2012-08-16 13:27:25 +00:00
Dmitry Vyukov
912f3bf279
tsan: refactor cur_thread() -> thr
...
llvm-svn: 162017
2012-08-16 13:26:54 +00:00
Dmitry Vyukov
1c0b3c6b84
tsan: store sync objects in memory block headers + delete them when the block is freed
...
llvm-svn: 161959
2012-08-15 17:27:20 +00:00
Dmitry Vyukov
9f1509fe44
tsan: provide function that imitates write to a region but does not detect races
...
llvm-svn: 161957
2012-08-15 16:52:19 +00:00
Dmitry Vyukov
954fc8c3e4
tsan: switch to new allocator
...
llvm-svn: 161953
2012-08-15 15:35:15 +00:00
Dmitry Vyukov
81a78ad59c
tsan: handle larger number of goroutines + fix a memory leak of goroutine descriptors
...
llvm-svn: 161770
2012-08-13 18:44:44 +00:00
Dmitry Vyukov
2bee426ed6
tsan: fix parameter type for pwrite64() interceptor
...
llvm-svn: 161741
2012-08-12 11:08:30 +00:00
Alexey Samsonov
139a7c0575
[Sanitizer] Make ASan/TSan sources depend on headers from interception library
...
llvm-svn: 161113
2012-08-01 14:55:49 +00:00
Alexey Samsonov
a2e0cf4802
[TSan] delete trailing spaces
...
llvm-svn: 160955
2012-07-30 07:46:09 +00:00
Dmitry Vyukov
904d3f9c06
tsan: add ReleaseStore() function that merely copies vector clock rather than combines two clocks
...
fix clock setup for finalizer goroutine (Go runtime)
llvm-svn: 160918
2012-07-28 15:27:41 +00:00
Dmitry Vyukov
55253100be
tsan: add missing include
...
llvm-svn: 160875
2012-07-27 18:13:03 +00:00
Dmitry Vyukov
4e94662db4
tsan: change event handling from single HandleEvent() to a set of separate functions (Go runtime)
...
llvm-svn: 160863
2012-07-27 14:00:39 +00:00
Dmitry Vyukov
536551d02d
tasn: do not remember stack traces for sync objects for Go (they are not reported anyway)
...
llvm-svn: 160861
2012-07-27 13:21:33 +00:00
Dmitry Vyukov
e91e9ac2a2
tsan: remove unnecessary and wrong include
...
llvm-svn: 160860
2012-07-27 13:21:01 +00:00
Dmitry Vyukov
65ec6684c2
tsan: make the runtime library name tsan-neutral for Go upstream
...
llvm-svn: 160797
2012-07-26 18:42:51 +00:00
Dmitry Vyukov
55b405ef42
tsan: allow environment to override OnReport() and OverrideFlags()
...
llvm-svn: 160728
2012-07-25 14:30:51 +00:00
Dmitry Vyukov
dfc8e52400
tsan: suport for Go finalizers
...
llvm-svn: 160723
2012-07-25 13:16:35 +00:00
Dmitry Vyukov
d654f06644
tsan: expect that Go symbolizer can return NULLs
...
llvm-svn: 160722
2012-07-25 11:50:37 +00:00
Dmitry Vyukov
bcf0b7002b
tsan: align report style with Go internal format
...
llvm-svn: 160672
2012-07-24 12:29:43 +00:00
Dmitry Vyukov
69bee8d8f6
tsan: output goroutine creation stack
...
llvm-svn: 160670
2012-07-24 12:03:47 +00:00
Kostya Serebryany
ab34919413
[tsan] minor enhancements in the new tsan allocator and a test malloc replacement library that can be linked to any program to replace malloc (tested on spec2006)
...
llvm-svn: 160436
2012-07-18 16:04:55 +00:00
Alexey Samsonov
c6d97c0ad1
[TSan] fix confusing error message in CheckFailed
...
llvm-svn: 160435
2012-07-18 14:37:22 +00:00
Alexey Samsonov
93ca829c2d
[TSan] cleanup header comments
...
llvm-svn: 160359
2012-07-17 09:39:59 +00:00
Dmitry Vyukov
f2bc464f37
tsan: add platform suffix to Go runtime library
...
llvm-svn: 160304
2012-07-16 18:25:43 +00:00
Dmitry Vyukov
3abd096370
tsan: treat malloc() as memory access in Go
...
llvm-svn: 160289
2012-07-16 16:55:01 +00:00
Dmitry Vyukov
5bfac97ff9
tsan: use dynamic shadow stack for Go
...
llvm-svn: 160288
2012-07-16 16:44:47 +00:00
Dmitry Vyukov
dc36d69b6a
tsan: increase number of dead threads for Go
...
llvm-svn: 160283
2012-07-16 16:03:16 +00:00
Dmitry Vyukov
9270eaf1f2
tsan: Go runtime: support goroutine end event
...
llvm-svn: 160282
2012-07-16 16:01:08 +00:00
Dmitry Vyukov
5e5e36712b
tsan: fix build
...
llvm-svn: 160267
2012-07-16 13:25:47 +00:00
Dmitry Vyukov
c40c00767c
tsan: port Go runtime to Darwin
...
llvm-svn: 160266
2012-07-16 13:02:40 +00:00
Dmitry Vyukov
263efd8f05
tsan: allow to pass CFLAGS to Go runtime build script
...
llvm-svn: 160259
2012-07-16 10:36:39 +00:00
Dmitry Vyukov
2dac24a42b
tsan: add missing test for Go runtime
...
llvm-svn: 160258
2012-07-16 10:34:57 +00:00
Kostya Serebryany
38f318bf20
[tsan] use internal_strnlen in strncpy interceptor (the bug found while booting chromium)
...
llvm-svn: 160171
2012-07-13 13:04:43 +00:00
Alexey Samsonov
2c94cd6e3d
[Sanitizer] move flag parsing routines (and unit tests) from tsan runtime to common runtime.
...
llvm-svn: 159928
2012-07-09 13:21:39 +00:00
Dmitry Vyukov
239ae7186b
tsan: Go language support fixes
...
llvm-svn: 159856
2012-07-06 20:23:59 +00:00
Dmitry Vyukov
e0d31e9170
tsan: Go lang: symbolize stack traces
...
llvm-svn: 159827
2012-07-06 14:54:25 +00:00
Dmitry Vyukov
03d32ecd4f
tsan: Go language support
...
llvm-svn: 159754
2012-07-05 16:18:28 +00:00
Kostya Serebryany
ba235522e0
[tsan] reg test for tsan issue #3
...
llvm-svn: 159737
2012-07-05 09:09:40 +00:00
Alexey Samsonov
78a3bbc82c
[TSan] add a new option 'use_internal_symbolizer' that allows to choose between addr2line-based and llvm-based symbolizer w/o having to rebuild the runtime. This is hopefully a temporary solution that simplifies testing process. In the end, we should leave a single symbolizer.
...
llvm-svn: 159730
2012-07-05 07:18:29 +00:00
Alexey Samsonov
b4ea34f5d7
[TSan] Improve output tests: allow reports to contain file:line:column instead of file:line
...
llvm-svn: 159714
2012-07-04 15:48:05 +00:00
Alexey Samsonov
6f510f8eb5
[TSan] use threadsafe death tests in TSan unit tests
...
llvm-svn: 159533
2012-07-02 14:35:25 +00:00
Dmitry Vyukov
e8cee12ce2
tsan/asan: first try on msvc atomics
...
llvm-svn: 159443
2012-06-29 18:00:38 +00:00
Dmitry Vyukov
513f0238d8
tsan/asan: add SpinMutex to sanitizer_common
...
llvm-svn: 159439
2012-06-29 17:32:18 +00:00
Dmitry Vyukov
7a9fa7dbc5
tsan/asan: unify ScopedLock
...
llvm-svn: 159438
2012-06-29 17:10:08 +00:00
Dmitry Vyukov
6fa46f7003
tsan/asan: unify atomics (move atomics from tsan to sanitizer_common)
...
llvm-svn: 159437
2012-06-29 16:58:33 +00:00
Dmitry Vyukov
6967083071
tsan: use -Wno-unused-private-field only for clang (gcc does not understand it)
...
llvm-svn: 159435
2012-06-29 16:37:49 +00:00
Dmitry Vyukov
ef5a5a5650
tsan: replace struct copies where clang inserts memcpy() calls with explicit internal_memcpy() calls
...
llvm-svn: 159431
2012-06-29 15:26:55 +00:00
Dmitry Vyukov
5bb47a6e0e
tsan: remove own memset/memcpy/memcmp (too messy)
...
llvm-svn: 159430
2012-06-29 15:19:14 +00:00
Dmitry Vyukov
a932bdfc1e
tsan: clear shadow for ucontext, because it's visible to user
...
llvm-svn: 159365
2012-06-28 18:20:50 +00:00
Dmitry Vyukov
fa985a02ef
tsan: fix crashes if signal is caught during thread bootstrap or shutdown
...
llvm-svn: 159361
2012-06-28 18:07:46 +00:00
Dmitry Vyukov
e4df904770
tsan: add missing file (forgot to svn add in r159294)
...
llvm-svn: 159341
2012-06-28 09:04:45 +00:00
Dmitry Vyukov
090f345522
tsan: prevent insertion of unwanted memset/memcpy/memcmp into runtime
...
llvm-svn: 159294
2012-06-27 21:00:23 +00:00
Dmitry Vyukov
b94a8f0c39
tsan: remember and pass original ucontext to signal handlers (instead of a fabricated one)
...
llvm-svn: 159278
2012-06-27 17:35:35 +00:00
Dmitry Vyukov
97c26bdaea
tsan: refactor signal handling code (move some definitions out of common header)
...
llvm-svn: 159266
2012-06-27 16:05:06 +00:00
Dmitry Vyukov
d326a6cf93
tsan: check that signal handlers do not spoil errno.
...
llvm-svn: 159264
2012-06-27 13:54:46 +00:00
Dmitry Vyukov
f8b7a8dc08
tsan: close all file descriptors after fork()
...
llvm-svn: 159263
2012-06-27 12:48:46 +00:00
Alexey Samsonov
e2109388a4
[TSan] fix warnings suppression: internal-linkage-in-inline was renamed to static-in-inline
...
llvm-svn: 159198
2012-06-26 11:33:51 +00:00
Dmitry Vyukov
ec64f3e738
tsan: remove internal allocator, switch to sanitizer_common one.
...
llvm-svn: 159141
2012-06-25 15:03:15 +00:00
Dmitry Vyukov
de1fd1c83b
tsan: do not call malloc/free in memory access handling routine.
...
This improves signal-/fork-safety of instrumented programs.
llvm-svn: 158988
2012-06-22 11:08:55 +00:00
Kostya Serebryany
6e26fa9dd1
[tsan] first step in implementing a custom allocator for tsan (and msan) which saves precious shadow
...
llvm-svn: 158913
2012-06-21 10:04:36 +00:00
Kostya Serebryany
98390d0b71
[tsan] a bit more lint and Makefile changes to run tests from sanitizer_common
...
llvm-svn: 158821
2012-06-20 15:19:17 +00:00
Alexey Samsonov
e1cb524226
[Sanitizer] Renaming: SNPrintf -> internal_snprintf (and move it to sanitizer libc)
...
llvm-svn: 158710
2012-06-19 09:21:57 +00:00
Alexey Samsonov
b1c3991915
[TSan] Add a comment that tsan_flags.h may be included in the user code, and therefore shouldn't include other headers from TSan or common sanitizer runtime. User may need tsan_flags.h to provide its implementation of __tsan::OverrideFlags
...
llvm-svn: 158708
2012-06-19 08:57:53 +00:00
Alexey Samsonov
d9ae7adb84
[TSan] silence -Winternal-linkage-in-inlinewarning which is produced for gtest code
...
llvm-svn: 158705
2012-06-19 07:38:11 +00:00
Alexey Samsonov
cf7d233ac0
[TSan] kill some linux-specific code in favor of code in common runtime: reuse wrappers for mmap routines, ProcessMaps iterator, thread stack calculation
...
llvm-svn: 158657
2012-06-18 09:42:39 +00:00
Alexey Samsonov
58a3c58ec9
[Sanitizer] move different wrappers from TSan to common sanitizer runtime
...
llvm-svn: 158655
2012-06-18 08:44:30 +00:00
Alexey Samsonov
156958dd0c
[Sanitizer] move all the rest re-implementations of libc functions from ASan runtime to common sanitizer runtime
...
llvm-svn: 158519
2012-06-15 13:09:52 +00:00
Alexey Samsonov
3efd6fc26c
[Sanitizer] Use DEFINE_REAL macro in TSan runtime to call libc implementations of functions. Move strchr to sanitizer_libc.
...
llvm-svn: 158517
2012-06-15 12:24:07 +00:00
Alexey Samsonov
1042454b66
[TSan] don't use too new __attribute__((unused)) for class member
...
llvm-svn: 158500
2012-06-15 07:33:49 +00:00
Dmitry Vyukov
ea03fc2d78
tsan: fix COMPAT mapping to not produce false reports
...
llvm-svn: 158473
2012-06-14 21:40:35 +00:00
Alexey Samsonov
96ef49a71e
[Sanitizer] Move internal_memcmp to common sanitizer libc
...
llvm-svn: 158450
2012-06-14 14:04:54 +00:00
Alexey Samsonov
aac5d0c831
[Sanitizer] Workaround for -Wunused-private-field warning - add an attribute in TSan unit test, and silence this warning as gtest has unused fields.
...
llvm-svn: 158449
2012-06-14 14:02:32 +00:00
Alexey Samsonov
f516d39c1f
[TSan] use efficient real_memcpy inside runtime
...
llvm-svn: 158260
2012-06-09 09:14:24 +00:00
Alexey Samsonov
59036d2c06
[Sanitizer] add internal_memset and internal_strrchr to sanitizer_common/
...
llvm-svn: 158202
2012-06-08 14:11:12 +00:00
Alexey Samsonov
6cfc34ea7f
[TSan] s/internal_memset/real_memset
...
llvm-svn: 158200
2012-06-08 13:59:39 +00:00