Commit Graph

630 Commits

Author SHA1 Message Date
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
Dmitry Vyukov 019ef67a97 tsan: dump stack on internal assert failure
llvm-svn: 173799
2013-01-29 14:20:12 +00:00
Dmitry Vyukov 4399d92252 tsan: support for inprocess symbolizer
llvm-svn: 173797
2013-01-29 13:05:30 +00:00
Dmitry Vyukov b46930befa tsan: remember when we are inside of symbolizer code (required for inprocess symbolizer)
llvm-svn: 173796
2013-01-29 13:03:07 +00:00
Dmitry Vyukov 7943b69002 tsan: add IsSymbolizerAvailable() function for querying for presence of internal/external symbolizer
llvm-svn: 173783
2013-01-29 09:35:14 +00:00
Dmitry Vyukov b130fc3c0d tsan: add interceptor stubs for stat family of functions
llvm-svn: 173782
2013-01-29 09:23:09 +00:00
Kostya Serebryany fa79cd65e2 [sanitizer] fix calloc overflow in asan/tsan/msan
llvm-svn: 173441
2013-01-25 11:46:22 +00:00
Dmitry Vyukov 4e3b9802bd tsan: return the old fake numbers from malloc stats (some code already depends on them)
llvm-svn: 173348
2013-01-24 14:07:19 +00:00
Dmitry Vyukov f4f76b1c10 tsan: suppress reports using both stacks
llvm-svn: 173346
2013-01-24 13:50:32 +00:00
Dmitry Vyukov 83566dadaf tsan: allow a front-end to provide default suppressions
llvm-svn: 173345
2013-01-24 13:50:10 +00:00
Dmitry Vyukov 6e406cda4b tsan: implement malloc stats querying
llvm-svn: 173332
2013-01-24 09:08:03 +00:00
Dmitry Vyukov e9a44974d4 tsan: also test asan during presubmit checks, because sanitizer_common changes can affect it
llvm-svn: 173327
2013-01-24 07:43:55 +00:00
Dmitry Vyukov 228921d71e tsan: add stubs for malloc introspection (similar to what we have in asan)
llvm-svn: 173255
2013-01-23 12:08:03 +00:00
Kostya Serebryany 9b46312c87 [tsan] fix thread_name.cc test to work with older versions of libc
llvm-svn: 173023
2013-01-21 11:20:49 +00:00
Alexey Samsonov d0522c73b5 CMake: use add_compiler_rt_static_runtime to build TSan and MSan runtimes. No functionality change.
llvm-svn: 172978
2013-01-20 14:14:13 +00:00
Evgeniy Stepanov 01671c33ff [sanitizer] lint
llvm-svn: 172817
2013-01-18 13:12:56 +00:00
Evgeniy Stepanov a6c4a387ee [sanitizer] Rename 2 files *.h->*.inc as appropriate.
Also add a missing include.

llvm-svn: 172814
2013-01-18 13:01:18 +00:00
Alexey Samsonov 193b45f4fe CMake variables renaming: X86_64->x86_64 I386->i386
llvm-svn: 172812
2013-01-18 12:45:44 +00:00
Evgeniy Stepanov 222076e972 [sanitizer] Common *scanf interceptors.
llvm-svn: 172805
2013-01-18 11:17:23 +00:00
Kostya Serebryany 69fe0ba415 [sanitizer] reapply r172719, r172721-172723, r172725, and also fix the warning on Mac.
llvm-svn: 172791
2013-01-18 06:43:13 +00:00
Jakob Stoklund Olesen 7956e0094d Revert r172719, r172721-172723, and r172725.
The r172719 patch broke the build on Mac, the others depended on it.

compiler-rt/lib/asan/asan_interceptors.cc:78:13: error: unused function
      'SetThreadName' [-Werror,-Wunused-function]
      static void SetThreadName(const char *name) {

Orignal headlines:

  [asan] attempting to fix the Mac build
  [asan] restructure read/pread/pread64 tests
  [sanitizer] move write/pwrite/pwrite64 interceptors to common
  [msan] start using common interceptors in msan
  [tsan] move prctl interceptor from asan to common_interceptors thus enabling it for tsan too

llvm-svn: 172763
2013-01-17 22:51:56 +00:00
Kostya Serebryany 5cdd91fc43 [sanitizer] move write/pwrite/pwrite64 interceptors to common
llvm-svn: 172722
2013-01-17 14:48:03 +00:00
Kostya Serebryany f7f5566055 [tsan] move prctl interceptor from asan to common_interceptors thus enabling it for tsan too
llvm-svn: 172719
2013-01-17 13:38:16 +00:00
Kostya Serebryany 125e26d49b [tsan] add write_range/read_range hooks to common interceptors called from tsan (to find races on read/pread/etc)
llvm-svn: 172714
2013-01-17 13:18:40 +00:00
Kostya Serebryany 93ebdb5d64 [sanitizer] a bit more unification for interceptors (merge read/pread/pread64 in asan and tsan)
llvm-svn: 172713
2013-01-17 13:09:00 +00:00
Dmitry Vyukov c1a1517a37 tsan: describe stack and TLS addresses
llvm-svn: 172393
2013-01-14 10:00:03 +00:00
Dmitry Vyukov f22982bf0a asan/tsan: move blocking mutex from asan to sanitizer_common
llvm-svn: 172380
2013-01-14 07:51:39 +00:00
Dmitry Vyukov 89698ecf8a tsan: fix compiler warning
llvm-svn: 172191
2013-01-11 11:02:40 +00:00
Dmitry Vyukov 5cb6c62641 tsan: symbolize global variables
llvm-svn: 172181
2013-01-11 07:23:51 +00:00
Dmitry Vyukov 1bc29bd7bf tsan: add check for invalid fd
llvm-svn: 172060
2013-01-10 12:28:58 +00:00
Dmitry Vyukov a626d03266 tsan: detect races on fd passed to epoll_ctl
llvm-svn: 171981
2013-01-09 17:31:27 +00:00
Dmitry Vyukov a681c01b69 tsan: fix crash when user defines own fopen/fileno
llvm-svn: 171967
2013-01-09 11:54:52 +00:00
Dmitry Vyukov b4ede780b0 tsan: fix crash when user defines own fopen/fileno
llvm-svn: 171958
2013-01-09 08:22:06 +00:00
Alexey Samsonov 8474843e3b [TSan] Blacklist test: Rename blacklisted function. Make this test work for custom TSan testing script.
llvm-svn: 171186
2012-12-28 10:06:26 +00:00
Alexey Samsonov 8c01e76d27 [TSan] Add lit test for -fsanitize-blacklist= flag
llvm-svn: 171185
2012-12-28 09:32:36 +00:00
Alexey Samsonov f96bfd8849 Make ASan and TSan tests a bit less brittle with @LINE FileCheck macro
llvm-svn: 171181
2012-12-28 08:38:09 +00:00
Alexey Samsonov c20f5d2246 Define COMPILER_RT_CAN_EXECUTE_TESTS variable on platforms where we can produce working binaries and use it in build rules for sanitizers tests
llvm-svn: 171160
2012-12-27 13:19:23 +00:00
Kostya Serebryany 6f604b5007 [asan/tsan] when unmapping a chunk of user memory, apply madvise(MADV_DONTNEED) to the corresponding chunk of shadow memory. Also update sanitizer_allocator64_testlib.cc
llvm-svn: 171144
2012-12-27 07:37:24 +00:00
Dmitry Vyukov 774defc649 tsan: fix the code that searches for heap memory block metadata
(the old code won't work with new allocator)

llvm-svn: 171054
2012-12-25 07:45:40 +00:00
Dmitry Vyukov 19969e5045 tsan: work around FileCheck feature that it does not accept empty input
llvm-svn: 171034
2012-12-24 14:02:34 +00:00
Dmitry Vyukov f6d8021520 tsan: remove static reference to glibc internal _dl_get_tls_static_info()
(this breaks RPM packages)

llvm-svn: 171033
2012-12-24 13:43:53 +00:00
Dmitry Vyukov 73dac64b73 tsan: more defensive file descriptor verification
to prevent assertion failures on code like "write(-1, ...)"

llvm-svn: 171030
2012-12-24 11:43:34 +00:00
Dmitry Vyukov b3bf5651bd tsan: add java malloc stress test
llvm-svn: 170896
2012-12-21 13:40:27 +00:00
Dmitry Vyukov c23b218520 tsan: add java rwlock test
llvm-svn: 170894
2012-12-21 13:31:07 +00:00
Dmitry Vyukov c55ed2f538 tsan: add a test for java memory move
llvm-svn: 170893
2012-12-21 13:28:39 +00:00
Dmitry Vyukov e6b51986bb tsan: move common part of java tests into a separate header
llvm-svn: 170892
2012-12-21 13:26:10 +00:00
Dmitry Vyukov a33bf2701e tsan: fix Java memory move operations and add the test
llvm-svn: 170891
2012-12-21 13:23:48 +00:00
Dmitry Vyukov fe817bdb88 tsan: less debug output
llvm-svn: 170889
2012-12-21 12:30:52 +00:00
Dmitry Vyukov 58e617121d tsan: update mutex lock table for java
llvm-svn: 170885
2012-12-21 11:30:41 +00:00
Dmitry Vyukov 22be55e47e tsan: update mutex table for java
llvm-svn: 170884
2012-12-21 11:30:14 +00:00
Dmitry Vyukov a5b57100d4 tsan: java: move shadow memory on GC compaction
llvm-svn: 170882
2012-12-21 11:16:40 +00:00
Dmitry Vyukov bed53cfc12 tsan: add a high-level comment to tsan_interface_java.h
llvm-svn: 170881
2012-12-21 10:57:59 +00:00
Dmitry Vyukov 11bb06039a tsan: fix lint warnings
llvm-svn: 170877
2012-12-21 10:47:48 +00:00
Dmitry Vyukov 1859251df8 tsan: disable checks for limited address space and unlimited stack for Go
llvm-svn: 170876
2012-12-21 10:45:01 +00:00
Dmitry Vyukov 1fbe87d0c9 tsan: add lit test with statically linker libstdc++
llvm-svn: 170866
2012-12-21 08:08:19 +00:00
Dmitry Vyukov 47a5ad0348 tsan: use clang in cmake build + add -Werror
llvm-svn: 170844
2012-12-21 06:30:27 +00:00
Dmitry Vyukov 2547ac65eb tsan: java interface implementation skeleton
llvm-svn: 170707
2012-12-20 17:29:34 +00:00
Dmitry Vyukov 7b838ada82 tsan: add cmake build and tests into presubmit script
llvm-svn: 170695
2012-12-20 14:10:27 +00:00
Kostya Serebryany 54c6086e9c [tsan] fix cmake build
llvm-svn: 170689
2012-12-20 12:26:09 +00:00
Dmitry Vyukov d088b3b219 tsan: add java interface implementation stub
llvm-svn: 170681
2012-12-20 10:21:30 +00:00
Dmitry Vyukov 5a0761ed3c tsan: add Java interface
llvm-svn: 170679
2012-12-20 07:47:04 +00:00
Alexey Samsonov d12943e028 [TSan] build only gtest-all.o when building TSan unit tests
llvm-svn: 170519
2012-12-19 09:19:57 +00:00
Dmitry Vyukov 1ed72076b4 tsan: add lint check back into presubmit script
llvm-svn: 170515
2012-12-19 08:53:31 +00:00
Dmitry Vyukov c467933dc7 tsan: fix -Wgnu warnings
llvm-svn: 170499
2012-12-19 06:59:45 +00:00
Dmitry Vyukov 44e1beaee6 tsan: intercept fork() to prevent false race reports on fd's
llvm-svn: 170433
2012-12-18 14:44:44 +00:00
Dmitry Vyukov a2ce1e0055 tsan: warn about reports from signal handlers
llvm-svn: 170430
2012-12-18 14:19:24 +00:00
Dmitry Vyukov d509179a0b tsan: add signalfd() and inotify_init() interceptors
llvm-svn: 170429
2012-12-18 12:35:31 +00:00
Dmitry Vyukov 42230ae216 tsan: add io_sync flag that controls amount of IO synchronization
llvm-svn: 170427
2012-12-18 12:20:55 +00:00
Dmitry Vyukov 9c7bcfea6f tsan: remove TSAN_OPTIONS from the script
The runtime skips atexit sleep if there are no threads now,
so it must be fast w/o it.
Allows to specify own TSAN_OPTIONS for the tests.

llvm-svn: 170426
2012-12-18 12:19:50 +00:00
Alexey Samsonov f37c45c20d [Sanitizer] Expose StackTrace::GetPreviousInstructionPc() to get PC of call instruction from return address
llvm-svn: 170424
2012-12-18 09:57:34 +00:00
Dmitry Vyukov 6d315cbcc3 tsan: describe "file descriptor" location
llvm-svn: 170417
2012-12-18 06:57:34 +00:00
Dmitry Vyukov 09b0dbfaf9 tsan: say what thread had created a thread in reports
llvm-svn: 170346
2012-12-17 16:28:15 +00:00
Dmitry Vyukov 38d0b60fb9 tsan: synchronize connect->accept calls
llvm-svn: 170235
2012-12-14 20:01:58 +00:00
Dmitry Vyukov 5a3d15c126 tsan: add test for errno spoiling in signal handler
llvm-svn: 170207
2012-12-14 14:42:40 +00:00
Dmitry Vyukov be6005a0d5 tsan: add test for malloc/free in signal handler
llvm-svn: 170205
2012-12-14 13:56:27 +00:00
Dmitry Vyukov 714accd917 tsan: add sanity test for Go runtime into presubmit test
llvm-svn: 170185
2012-12-14 10:10:57 +00:00
Dmitry Vyukov e0c37640f7 tsan: add socketpair() interceptor and test
llvm-svn: 170184
2012-12-14 09:57:42 +00:00
Dmitry Vyukov 12ae8897e6 tsan: fix compilation with -pedantic
llvm-svn: 170131
2012-12-13 15:26:04 +00:00
Dmitry Vyukov 3533f76996 tsan: completely disable deadlock detector for Go
seems to cause some weird stack overflow

llvm-svn: 170116
2012-12-13 09:22:11 +00:00
Dmitry Vyukov 3e7ede230f tsan: support MapThreadTrace() on all platforms
llvm-svn: 170113
2012-12-13 08:14:02 +00:00
Kostya Serebryany e29883c10a [sanitizer] add OnMap/OnUmap callbacks to the allocator interface
llvm-svn: 169985
2012-12-12 14:32:18 +00:00
Kostya Serebryany c219f6c777 [tsan] fix cmake build
llvm-svn: 169982
2012-12-12 14:26:06 +00:00
Dmitry Vyukov 7d95323047 tsan: explain why pthread_cond_init() interceptor is commented out
llvm-svn: 169975
2012-12-12 13:11:44 +00:00
Dmitry Vyukov 9ba0f3d51c tsan: add comment to tsan_fd.h file
llvm-svn: 169973
2012-12-12 12:45:07 +00:00
Dmitry Vyukov 9190a036d7 tsan: add missing files
llvm-svn: 169971
2012-12-12 12:27:00 +00:00
Dmitry Vyukov 60c14ce625 tsan: more precise handling of IO synchronization
llvm-svn: 169970
2012-12-12 11:59:30 +00:00
Kostya Serebryany 9a58d399c7 [asan] add sanitizer_common/sanitizer_common_interceptors.h with pread/pread64/read interceptors. Use it in asan. Add asan tests for pread/etc. Add FIXME to tsan/msan interceptors
llvm-svn: 169966
2012-12-12 09:54:35 +00:00
Dmitry Vyukov 1046031e1a tsan: exclude flaky test
llvm-svn: 169729
2012-12-10 09:16:17 +00:00
David Blaikie a00d9caa8f Unbreak the C++98 build.
llvm-svn: 169636
2012-12-07 21:39:54 +00:00
Dmitry Vyukov 54b87409b4 tsan: even more fd interceptors + fixes
llvm-svn: 169628
2012-12-07 19:23:59 +00:00
Dmitry Vyukov 04580518ce tsan: more fd interceptors + bug fixes + tests
llvm-svn: 169621
2012-12-07 18:30:40 +00:00
Dmitry Vyukov 0ef99e2a48 tsan: fix pipe interceptors and add 2 tests
llvm-svn: 169607
2012-12-07 16:22:54 +00:00
Dmitry Vyukov 4e7c0f95fb tsan: add pipe interceptors
llvm-svn: 169602
2012-12-07 15:32:56 +00:00
Dmitry Vyukov 5f4ab30be0 tsan: refactoring is preparation to more precise fd synchronization handling
llvm-svn: 169600
2012-12-07 14:40:10 +00:00
Dmitry Vyukov 5e700abc1c tsan: deflake output tests (by increasing sleeps)
llvm-svn: 169592
2012-12-07 09:24:57 +00:00
Dmitry Vyukov e3e0557f19 tsan: fix lint warning and make output tests more robust
llvm-svn: 169511
2012-12-06 15:42:54 +00:00
Dmitry Vyukov 6ee2cde066 tsan: add new file to cmake
llvm-svn: 169502
2012-12-06 13:32:49 +00:00
Dmitry Vyukov 72064188bc tsan: add some more functions for java filtering
llvm-svn: 169501
2012-12-06 13:20:37 +00:00
Dmitry Vyukov fd1ba2af7d tsan: add 'free' to java nonsense reports
llvm-svn: 169494
2012-12-06 12:42:53 +00:00
Dmitry Vyukov fd5ebcd1b0 tsan: add mutexsets to reports
With this change reports say what mutexes the threads hold around the racy memory accesses.

llvm-svn: 169493
2012-12-06 12:16:15 +00:00
Dmitry Vyukov d413d8cfa9 tsan: fix memory barriers in atomics
llvm-svn: 169379
2012-12-05 13:14:55 +00:00
Dmitry Vyukov c446aa039a tsan: provide own implementation of __cxa_guard_xxx functions
that way we allow static linking of libstdc++

llvm-svn: 169376
2012-12-05 12:10:22 +00:00
Dmitry Vyukov 6411bd9877 tsan: remove unnecesary include file
llvm-svn: 169370
2012-12-05 10:16:17 +00:00
Kostya Serebryany 571232b8cf [tsan] get rid of *allocator64* files, moving everything to *allocator* files. This will help with the 32-bit allocator implementation and testing
llvm-svn: 169368
2012-12-05 10:09:15 +00:00
Dmitry Vyukov 1b46993598 tsan: output thread names
llvm-svn: 169279
2012-12-04 15:46:05 +00:00
Kostya Serebryany 242b6305f0 [tsan] add a compile-time error for 64-bit-only support
llvm-svn: 169275
2012-12-04 15:13:30 +00:00
Dmitry Vyukov 4b82b2bb6e tsan: make atomic operations atomic again
llvm-svn: 169273
2012-12-04 14:50:10 +00:00