summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* tsan: better diagnostics if thread finishes with ignores enabledDmitry Vyukov2013-11-271-6/+8
| | | | | | | print thread creation stack and stacks where ignores were enabled. llvm-svn: 195836
* tsan: support synchronization by means of linux aioDmitry Vyukov2013-11-271-2/+42
| | | | | | http://llvm-reviews.chandlerc.com/D2269 llvm-svn: 195830
* tsan: fix handling of setjmpDmitry Vyukov2013-11-211-4/+8
| | | | | | | | It's incorrect to take address of setjmp, because it may not (ligally) present in libc. Fixes http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59188 llvm-svn: 195345
* tsan: add support for robust mutexesDmitry Vyukov2013-11-151-2/+8
| | | | llvm-svn: 194823
* [sanitizer] Avoid needless use of stringification (#symver) in ↵Evgeniy Stepanov2013-11-121-2/+2
| | | | | | | | INTERCEPT_FUNCTION_VER. This is a workaround for clang-format bug (PR17874). llvm-svn: 194468
* [sanitizer] Warn if interception fails.Evgeniy Stepanov2013-11-111-0/+1
| | | | | | This includes a clang-format pass over common interceptors. llvm-svn: 194372
* tsna: do not call user code from within runtime (from fflush)Dmitry Vyukov2013-11-011-1/+7
| | | | llvm-svn: 193880
* [tsan] Fix unused variable warnings.Evgeniy Stepanov2013-10-291-4/+9
| | | | llvm-svn: 193639
* tsan/asan: support pthread_setname_np to set thread namesDmitry Vyukov2013-10-291-0/+16
| | | | llvm-svn: 193602
* tsan: start the background thread with signals blocked, otherwise it can ↵Dmitry Vyukov2013-10-281-0/+6
| | | | | | steal users signals llvm-svn: 193519
* [sanitizer] Intercept pthread_attr_get*.Evgeniy Stepanov2013-10-251-3/+2
| | | | llvm-svn: 193405
* [Sanitizer] Move pthread_cond_signal and pthread_cond_broadcast to common ↵Alexey Samsonov2013-10-171-16/+0
| | | | | | interceptors llvm-svn: 192876
* Make some pthread_mutex_* and pthread_cond_* interceptors common.Alexey Samsonov2013-10-161-36/+6
| | | | | | | | | | | | Reviewers: eugenis, dvyukov Reviewed By: dvyukov CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1937 llvm-svn: 192774
* tsan: use verbosity flag in sanitizer_common code directlyDmitry Vyukov2013-10-151-7/+1
| | | | | | now it's available from common_flags() llvm-svn: 192705
* tsan: resolve symlinks for called_from_lib suppressionsDmitry Vyukov2013-10-151-2/+2
| | | | llvm-svn: 192688
* tsan: catch more races on file descriptorsDmitry Vyukov2013-10-111-2/+10
| | | | llvm-svn: 192452
* tsan: fix epoll_ctl interceptorDmitry Vyukov2013-10-111-6/+8
| | | | | | | | | | | | | | | | | | Currently data-race-test unittests fail with the following false positive: WARNING: ThreadSanitizer: data race (pid=20365) Write of size 8 at 0x7da000008050 by thread T54: #0 close tsan_interceptors.cc:1483 (racecheck_unittest-linux-amd64-O0+0x0000000eb34a) #1 NegativeTests_epoll::Worker2() unittest/posix_tests.cc:1148 (racecheck_unittest-linux-amd64-O0+0x0000000cc6b1) #2 MyThread::ThreadBody(MyThread*) unittest/./thread_wrappers_pthread.h:367 (racecheck_unittest-linux-amd64-O0+0x000000097500) Previous read of size 8 at 0x7da000008050 by thread T49: #0 epoll_ctl tsan_interceptors.cc:1646 (racecheck_unittest-linux-amd64-O0+0x0000000e9fee) #1 NegativeTests_epoll::Worker1() unittest/posix_tests.cc:1140 (racecheck_unittest-linux-amd64-O0+0x0000000cc5b5) #2 MyThread::ThreadBody(MyThread*) unittest/./thread_wrappers_pthread.h:367 (racecheck_unittest-linux-amd64-O0+0x000000097500) llvm-svn: 192448
* [sanitizer] Move the PTHREAD_DESTRUCTOR_ITERATIONS constant to ↵Sergey Matveev2013-10-111-1/+2
| | | | | | | | sanitizer_linux.h. Add a test. llvm-svn: 192442
* 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. llvm-svn: 191946
* asan/msan/tsan: move _exit interceptor to common interceptorsDmitry Vyukov2013-10-031-10/+9
| | | | llvm-svn: 191903
* tsan: intercept _exit so that we can override exit statusDmitry Vyukov2013-10-031-10/+20
| | | | llvm-svn: 191898
* tsan: ignore interceptors coming from specified librariesDmitry Vyukov2013-10-031-38/+61
| | | | | | | | | | | | | 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. llvm-svn: 191897
* [sanitizer] A bunch of libc interceptors.Evgeniy Stepanov2013-09-251-12/+9
| | | | | | | | | | | | sigwait sigwaitinfo sigtimedwait sigemptyset sigfillset sigpending sigprocmask llvm-svn: 191374
* tsan: ignore malloc/free/strdup when called from libjvmDmitry Vyukov2013-09-211-7/+25
| | | | llvm-svn: 191153
* tsan: ignore all interceptors coming directly from JVMDmitry Vyukov2013-09-211-1/+16
| | | | llvm-svn: 191152
* tsan: intercept fork syscallDmitry Vyukov2013-09-211-18/+44
| | | | llvm-svn: 191144
* tsan: intercept close syscallDmitry Vyukov2013-09-211-0/+15
| | | | llvm-svn: 191129
* tsan: handle memory read/write in syscallsDmitry Vyukov2013-09-201-3/+13
| | | | llvm-svn: 191074
* tsan: do not crash when user intercepts fopen()Dmitry Vyukov2013-09-201-0/+4
| | | | llvm-svn: 191066
* tsan: fix linking of tsan runtime into dynamic librariesDmitry Vyukov2013-09-191-30/+24
| | | | | | | versioned symbols can not be linked into dynamic library w/o linker script also simplifies code as side effect llvm-svn: 191056
* [TSan] Fix -Wempty-body warningAlexey Samsonov2013-09-191-4/+8
| | | | llvm-svn: 190993
* 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 ... llvm-svn: 190989
* tsan: refactor internal IgnoreCtl interfaceDmitry Vyukov2013-09-191-4/+2
| | | | llvm-svn: 190987
* Delete unused variables.Eli Friedman2013-09-101-1/+0
| | | | llvm-svn: 190383
* [tsan] make calloc crash instead of returning 0 on overflow (controlled by ↵Kostya Serebryany2013-09-061-1/+2
| | | | | | the allocator_may_return_null flag) llvm-svn: 190135
* tsan: catch races on condition variablesDmitry Vyukov2013-09-031-0/+6
| | | | llvm-svn: 189816
* tsan: properly intercept pthread_cond functionsDmitry Vyukov2013-09-021-28/+31
| | | | llvm-svn: 189767
* 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 llvm-svn: 188291
* [*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' llvm-svn: 188262
* Define SANITIZER_INTERFACE_ATTRIBUTE on Windows and fix all the places where ↵Timur Iskhodzhanov2013-08-131-24/+24
| | | | | | SANITIZER_INTERFACE_ATTRIBUTE or SANITIZER_ATTRIBUTE_WEAK are used llvm-svn: 188261
* [sanitizer] Intercept poll/ppoll.Evgeniy Stepanov2013-08-121-7/+1
| | | | llvm-svn: 188177
* tsan: treat SIGSYS as synchronous signalDmitry Vyukov2013-07-181-1/+2
| | | | | | | | It is required for chromium sandboxing code. From the description it seems to be indeed synchronous -- called back on syscall with incorrect arguments, but seems to be unused in practice. So this should be fine. llvm-svn: 186579
* tsan: disable one more interceptor that causes recursionDmitry Vyukov2013-07-171-0/+1
| | | | llvm-svn: 186497
* [Sanitizer] move strcpy and strncpy to common interceptorsAlexey Samsonov2013-07-161-26/+0
| | | | llvm-svn: 186408
* tsan: support sigsuspend() callDmitry Vyukov2013-07-161-0/+6
| | | | | | Intercepting it makes it process pending signal before return. llvm-svn: 186400
* [sanitizer] Support GLOB_ALTDIRFUNC in glob interceptor.Evgeniy Stepanov2013-07-091-3/+6
| | | | llvm-svn: 185932
* Hide mlock/munlock info message under verbosity flag.Alexey Samsonov2013-07-011-1/+2
| | | | llvm-svn: 185314
* tsan: add missing __attribute__((visibility("default"))) to interface functionsDmitry Vyukov2013-06-251-0/+30
| | | | llvm-svn: 184858
* [sanitizer] Intercept readv, preadv, writev, pwritev.Evgeniy Stepanov2013-06-241-38/+0
| | | | llvm-svn: 184717
* tsan: consistently use return pc as top frame pcDmitry Vyukov2013-06-171-2/+2
| | | | | | | always substract 1 from the top pc this allows to get correct stacks with -O2 llvm-svn: 184112
OpenPOWER on IntegriCloud