summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/tsan
Commit message (Collapse)AuthorAgeFilesLines
...
* [compiler-rt] compiler-rt's CMake append_if function clashes with LLVM's, ↵Kuba Brecka2014-10-152-5/+5
| | | | | | | | | | let's rename it to append_list_if Doing s/append_if/append_list_if/, no functional change. http://reviews.llvm.org/D5739 llvm-svn: 219860
* tsan: fix false positive related to signalsDmitry Vyukov2014-10-153-10/+13
| | | | | | | Write interceptor calls malloc, which causes a false unsafe-call-in-signal-handler report. See the test. llvm-svn: 219784
* tsan: use a different dir for llvm buildDmitry Vyukov2014-10-151-4/+4
| | | | | | build is used as gtest temp build dir, and is cleared during every build llvm-svn: 219783
* tsan: remove dead codeDmitry Vyukov2014-10-151-60/+0
| | | | llvm-svn: 219779
* tsan: remove trailing whitespaceDmitry Vyukov2014-10-141-1/+1
| | | | llvm-svn: 219678
* tsan: refactor atexit handlingDmitry Vyukov2014-10-141-36/+53
| | | | | | | | | | The current handling (manual execution of atexit callbacks) is overly complex and leads to constant problems due to mutual ordering of callbacks. Instead simply wrap callbacks into our wrapper to establish the necessary synchronization. Fixes issue https://code.google.com/p/thread-sanitizer/issues/detail?id=80 llvm-svn: 219675
* tsan: better reporting for virtual-call-after-freeDmitry Vyukov2014-10-134-1/+8
| | | | | | | Previously we said that it's a data race, which is confusing if it happens in the same thread. llvm-svn: 219600
* [Tsan] Do not use INTERCEPT_FUNCTION_VER() on FreeBSDViktor Kutuzov2014-10-101-1/+5
| | | | | | Differential Revision: http://reviews.llvm.org/D5708 llvm-svn: 219483
* [Tsan] Fix references to libc entities in tsan_interceptors.cc on FreeBSDViktor Kutuzov2014-10-091-0/+14
| | | | | | Differential Revision: http://reviews.llvm.org/D5663 llvm-svn: 219395
* tsan: output stats about stackdepot in memory profilerDmitry Vyukov2014-10-031-1/+4
| | | | | | | | | | | quite amusing on some programs: RSS 9152 MB: shadow:2456 meta:1736 file:454 mmap:3442 trace:196 heap:866 other:0 stacks=176[1065994] nthr=157/159 ... RSS 30192 MB: shadow:613 meta:5550 file:1839 mmap:20487 trace:212 heap:1489 other:0 stacks=12870[1599445] nthr=162/165 ... RSS 42232 MB: shadow:599 meta:8199 file:2304 mmap:29420 trace:213 heap:1494 other:0 stacks=17794[1690645] nthr=162/165 llvm-svn: 218988
* tsan: more careful handling of signalsDmitry Vyukov2014-09-181-21/+33
| | | | | | | | | | | | | | | On some tests we see that signals are not delivered when a thread is blocked in epoll_wait. The hypothesis is that the signal is delivered right before epoll_wait call. The signal is queued as in_blocking_func is not set yet, and then the thread just blocks in epoll_wait forever. So double check pending signals *after* setting in_blocking_func. This way we either queue a signal and handle it in the beginning of a blocking func, or process the signal synchronously if it's delivered when in_blocking_func is set. llvm-svn: 218070
* Do not link the dyndd runtime library against libdl on FreeBSDViktor Kutuzov2014-09-171-1/+5
| | | | | | Differential Revision: http://reviews.llvm.org/D5207 llvm-svn: 217944
* tsan: fix crash when a program registers zillions of atexit callbacksDmitry Vyukov2014-09-171-1/+0
| | | | | | | | | | I don't remember that crash on mmap in internal allocator ever yielded anything useful, only crashes in rare wierd untested situations. One of the reasons for crash was to catch if tsan starts allocating clocks using mmap. Tsan does not allocate clocks using internal_alloc anymore. Solve it once and for all by allowing mmaps. llvm-svn: 217929
* tsan: support longjmp out of signal handlersDmitry Vyukov2014-09-162-0/+15
| | | | | | Fixes https://code.google.com/p/thread-sanitizer/issues/detail?id=75 llvm-svn: 217908
* tsan: use growable vector for atexit callbacksDmitry Vyukov2014-09-121-10/+6
| | | | | | Most real programs setup much more than 1024 callbacks. llvm-svn: 217713
* [TSan] Use common flags in the same way as all the other sanitizersAlexey Samsonov2014-09-108-116/+37
| | | | llvm-svn: 217559
* [Sanitizer] Get rid of Symbolizer::Get() and Symbolizer::GetOrNull().Alexey Samsonov2014-09-101-3/+3
| | | | | | | | | We may as well just use Symbolizer::GetOrInit() in all the cases. Don't call Symbolizer::Get() early in tools initialization: these days it doesn't do any important setup work, and we may as well create the symbolizer the first time it's actually needed. llvm-svn: 217558
* Support building tsan_test_util_linux.cc on FreeBSDViktor Kutuzov2014-09-061-3/+8
| | | | | | Differential Revision: http://reviews.llvm.org/D5210 llvm-svn: 217309
* tsan: handle early signalsDmitry Vyukov2014-09-033-4/+3
| | | | | | | The second part of the fix of https://code.google.com/p/thread-sanitizer/issues/detail?id=71 llvm-svn: 217031
* tsan: more precise handling of atexit callbacksDmitry Vyukov2014-09-021-30/+57
| | | | | | Fixes issue https://code.google.com/p/thread-sanitizer/issues/detail?id=74 llvm-svn: 216906
* tsan: disable getpwent interceptorsDmitry Vyukov2014-09-021-0/+12
| | | | | | | | | | | There interceptors do not seem to be strictly necessary for tsan. But we see cases where the interceptors consume 70% of execution time. Memory blocks passed to fgetgrent_r are "written to" by tsan several times. First, there is some recursion (getgrnam_r calls fgetgrent_r), and each function "writes to" the buffer. Then, the same memory is "written to" twice, first as buf and then as pwbufp (both of them refer to the same addresses). llvm-svn: 216904
* tsan: restructure signal handling to allow recursive handlingDmitry Vyukov2014-09-023-24/+31
| | | | | | | Fixes issue https://code.google.com/p/thread-sanitizer/issues/detail?id=71 llvm-svn: 216903
* tsan: address comments in r214912Dmitry Vyukov2014-09-022-36/+37
| | | | | | See http://reviews.llvm.org/D4794 llvm-svn: 216900
* tsan: fix false positive related to signal handlersDmitry Vyukov2014-09-011-0/+2
| | | | | | | Users expect synchronization between sigaction and arrival of the signal. See the test for details. llvm-svn: 216878
* [sanitizer] move mlock interceptor from asan/tsan/msan to common; no ↵Kostya Serebryany2014-08-251-34/+0
| | | | | | functionality change intended llvm-svn: 216407
* [TSan] Initialize flags as early as possible. Disables back coredump, ↵Alexey Samsonov2014-08-155-11/+8
| | | | | | accidentally enabled in r215479. Add a test. llvm-svn: 215763
* tsan: fix unaligned memory access routineDmitry Vyukov2014-08-131-3/+3
| | | | | | It was possimitically handling an aligned 8-byte access as 2 4-byte accesses. llvm-svn: 215546
* [TSan] Share the code the setup code calling getrlim/setrlim with ↵Alexey Samsonov2014-08-122-31/+5
| | | | | | sanitizer_common llvm-svn: 215481
* [Sanitizer] Make disable_coredump a common flag and use it in TSanAlexey Samsonov2014-08-121-2/+1
| | | | llvm-svn: 215479
* [Sanitizer] Kill deprecated allocator interfaces in ASan, MSan and TSan in ↵Alexey Samsonov2014-08-121-30/+0
| | | | | | | | favor of a unified interface in <sanitizer/allocator_interface.h>. llvm-svn: 215469
* [TSan] Try to fix Go runtime buildAlexey Samsonov2014-08-061-1/+3
| | | | llvm-svn: 215000
* tsan: allocate vector clocks using slab allocatorDmitry Vyukov2014-08-0510-113/+310
| | | | | | | | | | Vector clocks is the most actively allocated object in tsan runtime. Current internal allocator is not scalable enough to handle allocation of clocks in scalable way (too small caches). This changes transforms clocks to 2-level array with 512-byte blocks. Since all blocks are of the same size, it's possible to cache them more efficiently in per-thread caches. llvm-svn: 214912
* [Sanitizer] Turn SuppressionContext::Init() into InitIfNecessary().Alexey Samsonov2014-08-051-1/+5
| | | | | | | Suppression context might be used in multiple sanitizers working simultaneously (e.g. LSan and UBSan) and not knowing about each other. llvm-svn: 214831
* tsan: use MADV_NOHUGEPAGE only if it is supported by platformDmitry Vyukov2014-07-311-0/+2
| | | | | | | Fixes build failure on an old system: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-centos-6.5/builds/7555/steps/build/logs/stdio llvm-svn: 214394
* [Sanitizer] Hoist the code parsing suppressions file into sanitizer_common.Alexey Samsonov2014-07-301-36/+1
| | | | | | Remove corresponding bits from LSan and TSan runtimes. No functionality change. llvm-svn: 214344
* [Sanitizer] Make "suppressions" and "print_suppressions" common runtime flags.Alexey Samsonov2014-07-302-8/+1
| | | | | | No functionality change. llvm-svn: 214343
* [Sanitizer] Make SuppressionContext a singleton class, residing in ↵Alexey Samsonov2014-07-303-26/+15
| | | | | | | | | | sanitizer_common. Convert TSan and LSan to the new interface. More changes will follow: 1) "suppressions" should become a common runtime flag. 2) Code for parsing suppressions file should be moved to SuppressionContext::Init(). llvm-svn: 214334
* tsan: add a useful debug checkDmitry Vyukov2014-07-281-0/+1
| | | | llvm-svn: 214082
* tsan: advise shadow for 0x7f region to not use huge pagesDmitry Vyukov2014-07-261-0/+6
| | | | | | see the comment for justification llvm-svn: 214030
* [Sanitizer] Simplify Symbolizer creation interface.Alexey Samsonov2014-07-261-2/+1
| | | | | | | | | | | Get rid of Symbolizer::Init(path_to_external) in favor of thread-safe Symbolizer::GetOrInit(), and use the latter version everywhere. Implicitly depend on the value of external_symbolizer_path runtime flag instead of passing it around manually. No functionality change. llvm-svn: 214005
* tsan: query RSS every 100msDmitry Vyukov2014-07-251-3/+1
| | | | | | Now that it become faster, it's OK to query it every 100ms again. llvm-svn: 213943
* tsan: fix and make faster GetRSSDmitry Vyukov2014-07-251-3/+24
| | | | | | | | It is currently broken because it reads a wrong value from profile (heap instead of total). Also make it faster by reading /proc/self/statm. Reading of /proc/self/smaps can consume more than 50% of time on beefy apps if done every 100ms. llvm-svn: 213942
* Build libcxx-tsan only if TSan is supported on host architectureAlexey Samsonov2014-07-231-1/+2
| | | | llvm-svn: 213791
* tsan: fix Go runtime build with clangDmitry Vyukov2014-07-181-4/+4
| | | | llvm-svn: 213384
* tsan: expose atomic operations in Go runtimeDmitry Vyukov2014-07-184-49/+155
| | | | llvm-svn: 213382
* tsan: remove special handling of false reports coming from JVMDmitry Vyukov2014-07-154-47/+0
| | | | | | There is now a more common functionality in the form of called_from_lib suppressions. llvm-svn: 213057
* tsan: remove compat mappingDmitry Vyukov2014-07-154-47/+2
| | | | | | There are no known usages anymore, so one less thing to support. llvm-svn: 213056
* [TSan] Fix a bug in libcxx-tsan build conditions spotted by Ryuta SuzukiAlexey Samsonov2014-07-101-1/+1
| | | | llvm-svn: 212749
* tsan: reapply 212531 and 212532 with a fixDmitry Vyukov2014-07-082-4/+17
| | | | | | don't reset s->addr as well llvm-svn: 212565
* [TSan] Revert r212531 and r212532.Alexey Samsonov2014-07-082-16/+3
| | | | | | They cause "check-tsan" command to hang. Details in r212532 review thread. llvm-svn: 212562
OpenPOWER on IntegriCloud