summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/tsan/rtl/tsan_report.h
Commit message (Collapse)AuthorAgeFilesLines
* sanitizers: Introduce ThreadType enumDmitry Vyukov2019-02-071-1/+2
| | | | | | | | | | | | | Replace bool workerthread flag with ThreadType enum. This change is preparation for fiber support. [dvyukov: fixed build of sanitizer_thread_registry_test.cc] Author: yuri (Yuri Per) Reviewed in: https://reviews.llvm.org/D57839 Context: https://reviews.llvm.org/D54889 llvm-svn: 353390
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Move __tsan::Vector to __sanitizerKamil Rytarowski2017-12-041-1/+1
| | | | | | | | | | | | | | | | | | | | | Summary: The low-fat STL-like vector container will be reused in MSan. It is needed to implement an atexit(3) interceptor on NetBSD/amd64 in MSan. Sponsored by <The NetBSD Foundation> Reviewers: joerg, dvyukov, eugenis, vitalybuka, kcc Reviewed By: dvyukov Subscribers: kubamracek, mgorny, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D40726 llvm-svn: 319650
* [tsan] Detect races on modifying accesses in Swift codeKuba Mracek2017-05-031-0/+1
| | | | | | | | This patch allows the Swift compiler to emit calls to `__tsan_external_write` before starting any modifying access, which will cause TSan to detect races on arrays, dictionaries and other classes defined in non-instrumented modules. Races on collections from the Swift standard library and user-defined structs and a frequent cause of subtle bugs and it's important that TSan detects those on top of existing LLVM IR instrumentation, which already detects races in direct memory accesses. Differential Revision: https://reviews.llvm.org/D31630 llvm-svn: 302050
* [sanitizer] Introduce tid_t as a typedef for OS-provided thread IDsKuba Mracek2017-04-171-1/+1
| | | | | | | | We seem to assume that OS-provided thread IDs are either uptr or int, neither of which is true on Darwin. This introduces a tid_t type, which holds a OS-provided thread ID (gettid on Linux, pthread_threadid_np on Darwin, pthread_self on FreeBSD). Differential Revision: https://reviews.llvm.org/D31774 llvm-svn: 300473
* [tsan] Provide API for libraries for race detection on custom objectsKuba Mracek2017-02-021-0/+3
| | | | | | | | This patch allows a non-instrumented library to call into TSan runtime, and tell us about "readonly" and "modifying" accesses to an arbitrary "object" and provide the caller and tag (type of object). This allows TSan to detect violations of API threading contracts where "read-only" methods can be called simulatenously from multiple threads, while modifying methods must be exclusive. Differential Revision: https://reviews.llvm.org/D28836 llvm-svn: 293885
* [tsan] Properly describe GCD worker threads in reportsKuba Mracek2017-02-021-1/+2
| | | | | | | | When dealing with GCD worker threads, TSan currently prints weird things like "created by thread T-1" and "[failed to restore the stack]" in reports. This patch avoids that and instead prints "Thread T3 (...) is a GCD worker thread". Differential Revision: https://reviews.llvm.org/D29103 llvm-svn: 293882
* [tsan] Rename ReportThread->pid to ReportThread->os_idKuba Brecka2016-04-211-1/+1
| | | | | | | | The field "pid" in ReportThread is used to store the OS-provided thread ID (pthread_self or gettid). The name "pid" suggests it's a process ID, which it isn't. Let's rename it. Differential Revision: http://reviews.llvm.org/D19365 llvm-svn: 266994
* [tsan] Detect uses of uninitialized, destroyed and invalid mutexesKuba Brecka2016-03-161-0/+1
| | | | | | | | This patch adds a new TSan report type, ReportTypeMutexInvalidAccess, which is triggered when pthread_mutex_lock or pthread_mutex_unlock returns EINVAL (this means the mutex is invalid, uninitialized or already destroyed). Differential Revision: http://reviews.llvm.org/D18132 llvm-svn: 263641
* Simplify Symbolizer::SymbolizePC() interface.Alexey Samsonov2014-12-021-3/+2
| | | | | | | | | | | Return a linked list of AddressInfo objects, instead of using an array of these objects as an output parameter. This simplifies the code in callers of this function (especially TSan). Fix a few memory leaks from internal allocator, when the returned AddressInfo objects were not properly cleared. llvm-svn: 223145
* [TSan] Refactor/simplify ReportLocation structure.Alexey Samsonov2014-11-041-7/+7
| | | | | | | | | | | | # Make DataInfo (describing a global) a member of ReportLocation to avoid unnecessary copies and allocations. # Introduce a constructor and a factory method, so that all structure users don't have to go to internal allocator directly. # Remove unused fields (file/line). No functionality change. llvm-svn: 221302
* [TSan] Make ReportStack contain __sanitizer::AddressInfo object.Alexey Samsonov2014-11-041-7/+6
| | | | | | | | | | AddressInfo contains the results of symbolization. Store this object directly in the symbolized stack, instead of copying data around and making unnecessary memory allocations. No functionality change. llvm-svn: 221294
* tsan: better reporting for virtual-call-after-freeDmitry Vyukov2014-10-131-0/+1
| | | | | | | Previously we said that it's a data race, which is confusing if it happens in the same thread. llvm-svn: 219600
* tsan: refactor suppressions machineryDmitry Vyukov2014-05-281-0/+2
| | | | | | | | | | The refactoring makes suppressions more flexible and allow to suppress based on arbitrary number of stacks. In particular it fixes: https://code.google.com/p/thread-sanitizer/issues/detail?id=64 "Make it possible to suppress deadlock reports by any stack (not just first)" llvm-svn: 209757
* tsan: better reports for "read lock of a write locked mutex"Dmitry Vyukov2014-04-251-0/+1
| | | | llvm-svn: 207209
* tsan: improve "read unlock of a write locked mutex" reportDmitry Vyukov2014-04-251-0/+1
| | | | llvm-svn: 207208
* tsan: better report for bad mutex unlocksDmitry Vyukov2014-04-251-0/+1
| | | | | | | + fixes crashes due to races on symbolizer, see https://code.google.com/p/thread-sanitizer/issues/detail?id=55 llvm-svn: 207206
* tsan: better reports for "double lock of a mutex"Dmitry Vyukov2014-04-251-0/+1
| | | | | | | + fixes crashes due to races on symbolizer, see: https://code.google.com/p/thread-sanitizer/issues/detail?id=55 llvm-svn: 207204
* [sanitizer] print threads in deadlock reportKostya Serebryany2014-03-211-0/+1
| | | | llvm-svn: 204461
* [tsan] when printing a mutex, also print its address. Properly print the ↵Kostya Serebryany2014-02-191-1/+3
| | | | | | deadlock report. llvm-svn: 201675
* tsan: better reporting of thread leaksDmitry Vyukov2013-03-211-0/+1
| | | | | | | 1. do not report running threads as leaks 2. aggregate leaked threads by creation stack llvm-svn: 177647
* tsan: better reporting for races on vptrDmitry Vyukov2013-03-211-0/+1
| | | | | | explicitly say "ctor/dtor vs virtual call" llvm-svn: 177640
* tsan: say that the memory access is atomic in reportsDmitry Vyukov2013-02-011-0/+1
| | | | llvm-svn: 174168
* tsan: describe stack and TLS addressesDmitry Vyukov2013-01-141-0/+1
| | | | llvm-svn: 172393
* tsan: describe "file descriptor" locationDmitry Vyukov2012-12-181-1/+3
| | | | llvm-svn: 170417
* tsan: say what thread had created a thread in reportsDmitry Vyukov2012-12-171-0/+1
| | | | llvm-svn: 170346
* tsan: add mutexsets to reportsDmitry Vyukov2012-12-061-3/+10
| | | | | | With this change reports say what mutexes the threads hold around the racy memory accesses. llvm-svn: 169493
* tsan: describe global vars (module+offset for now)Dmitry Vyukov2012-12-031-0/+2
| | | | llvm-svn: 169122
* tsan: fix mac buildDmitry Vyukov2012-10-021-1/+1
| | | | llvm-svn: 165004
* tsan: output tid's in reportsDmitry Vyukov2012-10-021-0/+1
| | | | llvm-svn: 164998
* [TSan] fix a bunch of warnings reported by pedantic gccAlexey Samsonov2012-09-131-2/+2
| | | | llvm-svn: 163788
* tsan: better diagnostics for mutex misuseDmitry Vyukov2012-09-011-0/+1
| | | | llvm-svn: 163060
* tsan: add "as if synchronized via sleep" featureDmitry Vyukov2012-08-311-0/+1
| | | | llvm-svn: 163006
* tsan: check that signal handlers do not spoil errno.Dmitry Vyukov2012-06-271-0/+1
| | | | llvm-svn: 159264
* tsan: detect accesses to freed memoryDmitry Vyukov2012-05-171-0/+1
| | | | | | http://codereview.appspot.com/6214052 llvm-svn: 156990
* [tsan] First commit of ThreadSanitizer (TSan) run-time library.Kostya Serebryany2012-05-101-0/+100
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. llvm-svn: 156542
OpenPOWER on IntegriCloud