summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_deadlock_detector1.cc
AgeCommit message (Collapse)Author
2016-05-21[tsan] Don't abort when a deadlock detector finds a mutex cycle longer than 10Kuba Brecka
In one of the already existing apps that I'm testing TSan on, I really see a mutex path that is longer than 10 (but not by much, something like 11-13 actually). Let's raise this to 20 and weaken the assertion so we don't crash. Differential Revision: http://reviews.llvm.org/D20427 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270319 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-30[sanitizer_common] Apply modernize-use-nullptr, other minor fixesVedant Kumar
- Trim spaces. - Use nullptr in place of 0 for pointer variables. - Use '!p' in place of 'p == 0' for null pointer checks. Patch by Eugene Zelenko! Differential Revision: http://reviews.llvm.org/D13310 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248964 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-11Use 'override/final' instead of 'virtual' for overridden methodsAlexander Kornienko
The patch is generated using clang-tidy misc-use-override check. This command was used: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \ -checks='-*,misc-use-override' -header-filter='llvm|clang' -j=32 -fix \ -format git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@234680 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-21[sanitizer] print threads in deadlock reportKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204461 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-19tsan: add test for second_deadlock_stack flagDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204240 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-19[sanitizer] use some c++11 to simplify the code (we can now). Fix one place ↵Kostya Serebryany
where a mutex acquisition stack trace was not properly remembered git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204237 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-19tsan: fix large stack frame in deadlock detectorDmitry Vyukov
In member function 'virtual void __sanitizer::DD::MutexBeforeLock(__sanitizer::DDCallback*, __sanitizer::DDMutex*, bool)': error: the frame size of 544 bytes is larger than 512 bytes [-Werror=frame-larger-than=] The code is now [arguably] better as well. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204227 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-18tsan: deadlock detector: add deadlock detector flagsDmitry Vyukov
the first flags is to enable printing of the second stack per edge git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204150 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-17[sanitizer] make the deadlock detector print 2*N stack traces on ↵Kostya Serebryany
lock-order-inversion with N locks (i.e. print stack traces for both lock acquisitions in every edge in the graph). More improvements to follow git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204042 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-17[sanitizer] print more stack traces when reporting a deadlock (even more to ↵Kostya Serebryany
come) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204034 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-14[sanitizer] fully implement racy fast path in bitset-based deadlock detectorKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@203910 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-14[sanitizer] partially implement racy fast path in bitset-based deadlock detectorKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@203904 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-14[sanitizer] in bitset-based deadlock detector collect edge's stack trace ↵Kostya Serebryany
when an edge is added to the graph (in following CLs these stack traces will be added to the report) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@203902 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-13[sanitizer] in bitvector-based deadlock detector split onLock into ↵Kostya Serebryany
onLockBefore and onLockAfter hooks git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@203796 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-13[sanitizer] support recursive rwlocks in bitset-based deadlock detectorKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@203779 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-05tsan: implement new version of standalong deadlock detectorDmitry Vyukov
intercept pthread_cond (it is required to properly track state of mutexes) detect cycles in mutex graph git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202975 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-04tsan: add dynamic library target for standalone deadlock detectorDmitry Vyukov
it's LD_PRELOAD-able git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202843 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-28[sanitizer] speedup deadlock detector for the case when we acquire the first ↵Kostya Serebryany
lock in a thread git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202492 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-28[sanitizer] speedup deadlock detector for the case when we destroy a mutex ↵Kostya Serebryany
that has never been locked git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202487 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-28tsan: refactor deadlock detectorDmitry Vyukov
Introduce DDetector interface between the tool and the DD itself. It will help to experiment with other DD implementation, as well as reuse DD in other tools. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202485 91177308-0d34-0410-b5e6-96231b3b80d8