summaryrefslogtreecommitdiff
path: root/lib/tsan/rtl/tsan_rtl_mutex.cc
AgeCommit message (Collapse)Author
2014-02-25[sanitizer] add support for try_lock in deadlock detectorKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202120 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-25[sanitizer] fix epoch handling in deadlock detector (before the fix, we ↵Kostya Serebryany
could have had edges from locks in the previous epoch to locks in the current epoch) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202118 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-21[tsan] add coarse-grained lock around the DeadlockDetector. We can do better ↵Kostya Serebryany
than that, but that's a start. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201861 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-19[tsan] when printing a mutex, also print its address. Properly print the ↵Kostya Serebryany
deadlock report. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201675 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-18[sanitizer] when reporting a deadlock also report the lock cycleKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201576 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-18[sanitizer] make sure the deadlock detector survives the change of epochs; ↵Kostya Serebryany
add a test and a comment git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201572 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-18[tsan] in deadlock detector do not register locks on their creation and ↵Kostya Serebryany
unregister them on destruction; added a relevant test git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201568 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-17[sanitizer] simplify DeadlockDetectorTLSKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201505 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14[tsan] rudimentary support for deadlock detector in tsan (nothing really ↵Kostya Serebryany
works yet except for a single tiny test). Also rename tsan's DeadlockDetector to InternalDeadlockDetector git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201407 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-24tsan: remove in_rtl counterDmitry Vyukov
This is intended to address the following problem. Episodically we see CHECK-failures when recursive interceptors call back into user code. Effectively we are not "in_rtl" at this point, but it's very complicated and fragile to properly maintain in_rtl property. Instead get rid of it. It was used mostly for sanity CHECKs, which basically never uncover real problems. Instead introduce ignore_interceptors flag, which is used in very few narrow places to disable recursive interceptors (e.g. during runtime initialization). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@197979 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-15tsan: add support for robust mutexesDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194823 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-10tsan: minor refactoringDmitry Vyukov
Replace duplicate code snippet with function. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192357 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-10tsan: add annotations to ignore synchronization operationsDmitry Vyukov
The annotations are AnnotateIgnoreSyncBegin/End, may be useful to ignore some infrastructure synchronization that introduces lots of false negatives. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192355 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-21tsan: improve diagnostics for incorrect usages of mutexesDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191151 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-17tsan: introduce recursive mutex lock/unlock java interfaceDmitry Vyukov
this is required to handle Object.Wait() git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182088 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-15[TSan] Switch TSan runtime to use ThreadRegistry class from sanitizer_commonAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177154 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-01tsan: even if races between atomic and plain memory accesses are turned off ↵Dmitry Vyukov
(report_atomic_races=0), still report races between atomic accesses and free(). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174175 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-01tsan: detect races between plain and atomic memory accessesDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174163 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-14tsan: describe stack and TLS addressesDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172393 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-06tsan: add mutexsets to reportsDmitry Vyukov
With this change reports say what mutexes the threads hold around the racy memory accesses. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169493 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-28tsan: move traces from tls into dedicated storage at fixed addressDmitry Vyukov
helps to reduce tls size (it's weird to have multi-MB tls) will help with dynamically adjustable trace size git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168783 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-07tsan: more precise handling of finalizersDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@167530 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-02[TSan] finally remove TsanPrintf in favor of Printf from sanitizer_commonAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@167294 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-05tsan: cache pc's that cause suppressions (this way we do not need to ↵Dmitry Vyukov
symbolize the reports) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@165317 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-07tsan: ignore destruction of global mutexes (causes a lot of non-interesting ↵Dmitry Vyukov
reports) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163400 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-01tsan: better diagnostics for mutex misuseDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163060 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-31tsan: fix crash when users pass insane mutex addresses in dynamic annotationsDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163016 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-31tsan: add "as if synchronized via sleep" featureDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@163006 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-31tsan: slightly optimize mutex unlock Dmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162995 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-18tsan: proper handling of linker initialized mutexesDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162169 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-16tsan: add flag to disable reporting of destruction of locked mutexes (some ↵Dmitry Vyukov
programs use that on a regular basis) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162024 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-16tsan: better diagnostics for destroy of a locked mutex + a testDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162022 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-16tsan: support for linker initializer mutexes with static storage durationDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162021 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-16tsan: implement RWLOCK annotationsDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@162019 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-28tsan: add ReleaseStore() function that merely copies vector clock rather ↵Dmitry Vyukov
than combines two clocks fix clock setup for finalizer goroutine (Go runtime) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@160918 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-06[Sanitizer]: Introduce a common internal printf function. For now, also use ↵Alexey Samsonov
tool-specific wrappers TsanPrintf (its output is controlled by TSan flags) and AsanPrintf (which copies its results to the ASan-private buffer). Supported formats: %[z]{d,u,x}, %s, %p. Re-write all format strings in TSan according to this format (this should have no effect on 64-bit platforms). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158065 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-06[TSan] run some renaming as a preparation for factoring out Printf ↵Alexey Samsonov
implementation. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158058 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-04Remove file-type tags in .cc files in tsan/ and sanitizer_common/Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@157928 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-10[tsan] First commit of ThreadSanitizer (TSan) run-time library.Kostya Serebryany
Algorithm description: http://code.google.com/p/thread-sanitizer/wiki/ThreadSanitizerAlgorithm Status: The tool is known to work on large real-life applications, but still has quite a few rough edges. Nothing is guaranteed yet. The tool works on x86_64 Linux. Support for 64-bit MacOS 10.7+ is planned for late 2012. Support for 32-bit OSes is doable, but problematic and not yet planed. Further commits coming: - tests - makefiles - documentation - clang driver patch The code was previously developed at http://code.google.com/p/data-race-test/source/browse/trunk/v2/ by Dmitry Vyukov and Kostya Serebryany with contributions from Timur Iskhodzhanov, Alexander Potapenko, Alexey Samsonov and Evgeniy Stepanov. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@156542 91177308-0d34-0410-b5e6-96231b3b80d8