summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/tsan/rtl/tsan_debugging.cc
Commit message (Collapse)AuthorAgeFilesLines
* compiler-rt: Rename .cc file in lib/tsan/rtl to .cppNico Weber2019-08-011-262/+0
| | | | | | Like r367463, but for tsan/rtl. llvm-svn: 367564
* 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
* [TSan] Use switches when dealing with enumsJulian Lettner2019-01-161-22/+28
| | | | | | | | | | | | | | | | | | Summary: Small refactoring: replace some if-else cascades with switches so that the compiler warns us about missing cases. Maybe found a small bug? Reviewers: dcoughlin, kubamracek, dvyukov, delcypher, jfb Reviewed By: dvyukov Subscribers: llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D56295 llvm-svn: 351288
* [tsan] Add debugging API to retrieve the "external tag" from reportsKuba Mracek2018-05-101-0/+7
| | | | | | Differential Revision: https://reviews.llvm.org/D46661 llvm-svn: 332048
* [sanitizer] Introduce tid_t as a typedef for OS-provided thread IDsKuba Mracek2017-04-171-2/+2
| | | | | | | | 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
* Re-commit of r295318, which was reverted due to AArch64 flakiness. Moving ↵Kuba Mracek2017-02-221-0/+10
| | | | | | the test to Darwin only. llvm-svn: 295801
* Revert "[tsan] Provide external tags (object types) via debugging API"Diana Picus2017-02-201-10/+0
| | | | | | This reverts commit r295318 as the test is flaky on AArch64. llvm-svn: 295667
* [tsan] Provide external tags (object types) via debugging APIKuba Mracek2017-02-161-0/+10
| | | | | | | | In D28836, we added a way to tag heap objects and thus provide object types into report. This patch exposes this information into the debugging API. Differential Revision: https://reviews.llvm.org/D30023 llvm-svn: 295318
* [tsan] Provide API for libraries for race detection on custom objectsKuba Mracek2017-02-021-0/+1
| | | | | | | | 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] Implement __tsan_get_alloc_stack and __tsan_locate_address to query ↵Kuba Mracek2016-12-191-0/+77
| | | | | | | | | | pointer types and allocation stacks of heap pointers In ASan, we have __asan_locate_address and __asan_get_alloc_stack, which is used in LLDB/Xcode to show the allocation backtrace for a heap memory object. This patch implements the same for TSan. Differential Revision: https://reviews.llvm.org/D27656 llvm-svn: 290119
* tsan: fix compiler warningDmitry Vyukov2016-04-271-2/+1
| | | | | | | | | tsan_debugging.cc: In function ‘void* __tsan_get_current_report()’: tsan_debugging.cc:61:18: warning: cast from type ‘const __tsan::ReportDesc*’ to type ‘void*’ casts away qualifiers [-Wcast-qual] return (void *)rep; llvm-svn: 267679
* [tsan] Rename ReportThread->pid to ReportThread->os_idKuba Brecka2016-04-211-2/+2
| | | | | | | | 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] Add some NULL pointer checks into the debugging APIKuba Brecka2016-03-211-5/+5
| | | | | | | | `__tsan_get_report_thread` and others can crash if a stack trace is missing, let's add the missing checks. Differential Revision: http://reviews.llvm.org/D18306 llvm-svn: 263939
* [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
* [tsan] Add TSan debugger APIsKuba Brecka2016-03-101-0/+162
Currently, TSan only reports everything in a formatted textual form. The idea behind this patch is to provide a consistent API that can be used to query information contained in a TSan-produced report. User can use these APIs either in a debugger (via a script or directly), or they can use it directly from the process (e.g. in the __tsan_on_report callback). ASan already has a similar API, see http://reviews.llvm.org/D4466. Differential Revision: http://reviews.llvm.org/D16191 llvm-svn: 263126
OpenPOWER on IntegriCloud