summaryrefslogtreecommitdiff
path: root/lib/tsan
Commit message (Collapse)AuthorAgeFilesLines
...
* [TSan] Automatically pick up llvm-symbolizer from PATH, as we do in another ↵Alexey Samsonov2013-10-043-16/+7
| | | | | | sanitizers git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191954 91177308-0d34-0410-b5e6-96231b3b80d8
* [TSan] Add ValgrindSlowdown to the list of exported symbolsAlexey Samsonov2013-10-041-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191952 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: fix a bug in pthread_once when called from an ignored libraryDmitry Vyukov2013-10-041-3/+7
| | | | | | | | It must set thr->in_rtl = 0 before executing user callback. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191946 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor the usage of strip_path_prefix option and make it more consistent ↵Alexey Samsonov2013-10-041-0/+1
| | | | | | across sanitizers git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191943 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: add memory_limit_mb flagDmitry Vyukov2013-10-035-2/+41
| | | | | | | | | The flag allows to bound maximum process memory consumption (best effort). If RSS reaches memory_limit_mb, tsan flushes all shadow memory. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191913 91177308-0d34-0410-b5e6-96231b3b80d8
* asan/msan/tsan: move _exit interceptor to common interceptorsDmitry Vyukov2013-10-031-10/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191903 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: include lsan into presubmit checkDmitry Vyukov2013-10-031-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191902 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: intercept _exit so that we can override exit statusDmitry Vyukov2013-10-034-10/+25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191898 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: ignore interceptors coming from specified librariesDmitry Vyukov2013-10-0320-58/+247
| | | | | | | | | | | | | | | LibIgnore allows to ignore all interceptors called from a particular set of dynamic libraries. LibIgnore remembers all "called_from_lib" suppressions from the provided SuppressionContext; finds code ranges for the libraries; and checks whether the provided PC value belongs to the code ranges. Also make malloc and friends interceptors use SCOPED_INTERCEPTOR_RAW instead of SCOPED_TSAN_INTERCEPTOR, because if they are called from an ignored lib, then must call our internal allocator instead of libc malloc. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191897 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: use ninja instead of make (faster and less output)Dmitry Vyukov2013-10-021-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191819 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Intercept backtrace, backtrace_symbols.Evgeniy Stepanov2013-09-272-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191516 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: support allocator_may_return_null flagDmitry Vyukov2013-09-273-2/+6
| | | | | | | | Fixes https://code.google.com/p/thread-sanitizer/issues/detail?id=29 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191482 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] A bunch of libc interceptors.Evgeniy Stepanov2013-09-253-12/+23
| | | | | | | | | | | | | sigwait sigwaitinfo sigtimedwait sigemptyset sigfillset sigpending sigprocmask git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191374 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Intercept wordexp.Evgeniy Stepanov2013-09-242-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191305 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: remove unneeded ___chkstk_ms function from Go runtimeDmitry Vyukov2013-09-222-36/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191161 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: allow symbolization of non-native PCs, e.g. coming from JIT/JAVA/etcDmitry Vyukov2013-09-221-0/+49
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191157 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: ignore malloc/free/strdup when called from libjvmDmitry Vyukov2013-09-213-7/+27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191153 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: ignore all interceptors coming directly from JVMDmitry Vyukov2013-09-216-2/+38
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191152 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: improve diagnostics for incorrect usages of mutexesDmitry Vyukov2013-09-211-7/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191151 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: intercept fork syscallDmitry Vyukov2013-09-211-18/+44
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191144 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: intercept close syscallDmitry Vyukov2013-09-211-0/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191129 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: handle memory read/write in syscallsDmitry Vyukov2013-09-201-3/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191074 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: allow to ignore memory accesses in malloc and freeDmitry Vyukov2013-09-203-4/+83
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191072 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: do not crash when user intercepts fopen()Dmitry Vyukov2013-09-201-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191066 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: fix linking of tsan runtime into dynamic librariesDmitry Vyukov2013-09-193-45/+36
| | | | | | | | | versioned symbols can not be linked into dynamic library w/o linker script also simplifies code as side effect git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191056 91177308-0d34-0410-b5e6-96231b3b80d8
* [TSan] Fix -Wempty-body warningAlexey Samsonov2013-09-191-4/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190993 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: prevent the following false positive due to __cxa_atexitDmitry Vyukov2013-09-191-2/+8
| | | | | | | | | | | | | | | | | WARNING: ThreadSanitizer: data race (pid=29103) Write of size 8 at 0x7d64003bbf00 by main thread: #0 free tsan_interceptors.cc:477 #1 __run_exit_handlers <null>:0 (libc.so.6+0x000000050cb7) Previous write of size 8 at 0x7d64003bbf00 by thread T78 (mutexes: write M9896): #0 calloc tsan_interceptors.cc:449 #1 ... git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190989 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: consistently use thr instead of cur_thread() in annotations implementationDmitry Vyukov2013-09-191-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190988 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: refactor internal IgnoreCtl interfaceDmitry Vyukov2013-09-194-15/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190987 91177308-0d34-0410-b5e6-96231b3b80d8
* [tsan] No-op implementation of AnnotateMemoryIsInitialized.Evgeniy Stepanov2013-09-181-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190933 91177308-0d34-0410-b5e6-96231b3b80d8
* [TSan] Use --whole-archive around TSan runtime in old TSan makefiles. Fix a ↵Alexey Samsonov2013-09-112-2/+2
| | | | | | Go build git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190513 91177308-0d34-0410-b5e6-96231b3b80d8
* [TSan] Use Clang to compile and link TSan unit tests with TSan runtimeAlexey Samsonov2013-09-114-26/+72
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190503 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] Refactor symbolization interface: use class instead of several ↵Alexey Samsonov2013-09-102-8/+8
| | | | | | functions. Move some code around to get rid of extra source files git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190410 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete unused variables.Eli Friedman2013-09-101-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190383 91177308-0d34-0410-b5e6-96231b3b80d8
* [tsan] make calloc crash instead of returning 0 on overflow (controlled by ↵Kostya Serebryany2013-09-065-4/+74
| | | | | | the allocator_may_return_null flag) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190135 91177308-0d34-0410-b5e6-96231b3b80d8
* [tsan] add colors to tsan outputKostya Serebryany2013-09-051-2/+43
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190045 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: catch races on condition variablesDmitry Vyukov2013-09-033-0/+95
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189816 91177308-0d34-0410-b5e6-96231b3b80d8
* [TSan] fixup for r189791: don't put ; on the newlineAlexey Samsonov2013-09-031-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189792 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: add suppressions for true/false positives in standard librariesDmitry Vyukov2013-09-031-0/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189791 91177308-0d34-0410-b5e6-96231b3b80d8
* [TSan] Move the /proc/self/maps parsing logic to sanitizer_common Alexander Potapenko2013-09-031-57/+20
| | | | | | | | Provide a generic way for the tools to generate memory profiles from contents of /proc/self/maps git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189789 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: properly intercept pthread_cond functionsDmitry Vyukov2013-09-025-41/+91
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189767 91177308-0d34-0410-b5e6-96231b3b80d8
* [TSan] Add a couple of compiler warnings to TSan runtime compile flagsAlexey Samsonov2013-08-291-5/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189581 91177308-0d34-0410-b5e6-96231b3b80d8
* [TSan] Move build rules a bit to ensure correct dependencies of check-tsan ↵Alexey Samsonov2013-08-292-53/+51
| | | | | | command git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189579 91177308-0d34-0410-b5e6-96231b3b80d8
* Properly generate lists of exported symbols for sanitizer runtimesAlexey Samsonov2013-08-275-66/+17
| | | | | | | | | | This change adds a Python script that is invoked for the just-built sanitizer runtime to generate the list of exported symbols passed to the linker. By default, it contains interceptors and sanitizer interface functions, but can be extended with tool-specific lists. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189356 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: better report formatting for GoDmitry Vyukov2013-08-163-14/+32
| | | | | | | | Say that gorotuine 1 is main goroutine. Remove excessive new line. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188542 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: intercept getaddrinfoDmitry Vyukov2013-08-131-0/+15
| | | | | | | | | This is necessary to prevent false positives, see: https://code.google.com/p/thread-sanitizer/issues/detail?id=25 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188291 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan/msan: add halt_on_error flagDmitry Vyukov2013-08-135-1/+33
| | | | | | | | If halt_on_error==true, program terminates after reporting first error. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188279 91177308-0d34-0410-b5e6-96231b3b80d8
* [*San/RTL] Fix minor breakageTimur Iskhodzhanov2013-08-131-8/+10
| | | | | | Grumbling: this hasn't been caught by running 'make check-{a,l,t}san check-sanitizer' git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188262 91177308-0d34-0410-b5e6-96231b3b80d8
* Define SANITIZER_INTERFACE_ATTRIBUTE on Windows and fix all the places where ↵Timur Iskhodzhanov2013-08-134-58/+64
| | | | | | SANITIZER_INTERFACE_ATTRIBUTE or SANITIZER_ATTRIBUTE_WEAK are used git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188261 91177308-0d34-0410-b5e6-96231b3b80d8
* Add "CHECK-" prefix to un-break buildbot failure.Rui Ueyama2013-08-121-2/+2
| | | | | | | After r188221, the prefix given by --check-prefix must match with the label as a whole. Substring is not considered to be a correct label anymore. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188227 91177308-0d34-0410-b5e6-96231b3b80d8