summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common/sanitizer_thread_registry.h
Commit message (Collapse)AuthorAgeFilesLines
* Dmitry Vyukov2019-02-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | tsan: add fiber support This patch adds functions for managing fibers: __tsan_get_current_fiber() __tsan_create_fiber() __tsan_destroy_fiber() __tsan_switch_to_fiber() __tsan_set_fiber_name() See the added tests for use examples. Author: yuri (Yuri Per) Reviewed in: https://reviews.llvm.org/D54889 [The previous commit of this change was reverted, this is a resubmit with a squashed fix for check_analyze.sh and COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED] llvm-svn: 353947
* Revert "tsan: add fiber support"Diana Picus2019-02-131-1/+0
| | | | | | | This reverts commit r353817 because we think it broke AARch64 and PowerPC buildbots. llvm-svn: 353939
* tsan: add fiber supportDmitry Vyukov2019-02-121-0/+1
| | | | | | | | | | | | | | | | | This patch adds functions for managing fibers: __tsan_get_current_fiber() __tsan_create_fiber() __tsan_destroy_fiber() __tsan_switch_to_fiber() __tsan_set_fiber_name() See the added tests for use examples. Author: yuri (Yuri Per) Reviewed in: https://reviews.llvm.org/D54889 llvm-svn: 353817
* sanitizers: Introduce ThreadType enumDmitry Vyukov2019-02-071-3/+8
| | | | | | | | | | | | | 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
* tsan: add pthread_tryjoin_np and pthread_timedjoin_np interceptorsDmitry Vyukov2018-11-211-0/+1
| | | | | | | | | | Add pthread_tryjoin_np() and pthread_timedjoin_np() interceptors on Linux, so that ThreadSanitizer can handle programs using these functions. Author: Yuri Per (yuri) Reviewed in: https://reviews.llvm.org/D54521 llvm-svn: 347383
* Prevent Thread Exited/Joined events raceKamil Rytarowski2017-11-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add atomic verification to ensure that Thread is Joined after marking it Finished. It is required for NetBSD in order to prevent Thread Exited/Joined race, that may occur when native system libpthread(3) cannot be reliably traced in a way to guarantee that the mentioned events happen one after another. This change fixes at least TSan and LSan on NetBSD. Sponsored by <The NetBSD Foundation> Reviewers: joerg, dvyukov, vitalybuka Reviewed By: dvyukov Subscribers: llvm-commits, kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D40294 llvm-svn: 319004
* [sanitizer] Introduce tid_t as a typedef for OS-provided thread IDsKuba Mracek2017-04-171-4/+4
| | | | | | | | 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] Properly describe GCD worker threads in reportsKuba Mracek2017-02-021-2/+3
| | | | | | | | 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
* [sanitizer] Fix Clang-tidy modernize-use-nullptr warnings in ↵Kostya Serebryany2015-09-291-4/+4
| | | | | | lib/sanitizer_common headers, unify closing inclusion guards. Patch by Eugene Zelenko llvm-svn: 248816
* tsan: address comments in r214912Dmitry Vyukov2014-09-021-1/+0
| | | | | | See http://reviews.llvm.org/D4794 llvm-svn: 216900
* tsan: allocate vector clocks using slab allocatorDmitry Vyukov2014-08-051-0/+2
| | | | | | | | | | Vector clocks is the most actively allocated object in tsan runtime. Current internal allocator is not scalable enough to handle allocation of clocks in scalable way (too small caches). This changes transforms clocks to 2-level array with 512-byte blocks. Since all blocks are of the same size, it's possible to cache them more efficiently in per-thread caches. llvm-svn: 214912
* tsan: fix vector clocksDmitry Vyukov2014-04-111-2/+3
| | | | | | | the new optimizations break when thread ids gets reused (clocks go backwards) add the necessary tests as well llvm-svn: 206035
* tsan/asan: support pthread_setname_np to set thread namesDmitry Vyukov2013-10-291-0/+1
| | | | llvm-svn: 193602
* [sanitizer] Move FindThreadByOSIdLocked from lsan to sanitizer_common.Sergey Matveev2013-05-271-1/+2
| | | | llvm-svn: 182728
* [Sanitizer] Compile sanitizer runtimes with -Wno-non-virtual-dtor. Virtual ↵Alexey Samsonov2013-03-251-4/+1
| | | | | | dtors may be a problem for us, as sanitizer runtime should not generally assume libstdc++ presence. llvm-svn: 177860
* tsan: flush dead thread info earlier (when another thread is finished rather ↵Dmitry Vyukov2013-03-191-2/+6
| | | | | | than new thread is created) llvm-svn: 177394
* tsan: fix clang -Wall buildDmitry Vyukov2013-03-181-0/+3
| | | | | | | Clang does not like classes with virtual functions but w/o virtual dtor. Go does not like libstdc++ (operator delete). llvm-svn: 177267
* tsan: fix Go buildDmitry Vyukov2013-03-181-1/+1
| | | | llvm-svn: 177260
* [Sanitizer] Build sanitizer_common tests w/o RTTI. Move ThreadRegistry class ↵Alexey Samsonov2013-03-151-18/+18
| | | | | | members below methods. llvm-svn: 177143
* Fix a virtual destructor warning.Eric Christopher2013-03-151-0/+1
| | | | | | Patch by Manuel Klimek! llvm-svn: 177132
* [Sanitizer] Fix compiler warnings and style issues in sanitizer_common ↵Alexey Samsonov2013-03-141-1/+2
| | | | | | tests. Use -Werror=sign-compare when building them. llvm-svn: 177077
* [Sanitizer] Add generic ThreadRegistry class for sanitizer runtimes. This ↵Alexey Samsonov2013-03-141-0/+138
class holds basic thread bookkeeping logic and allows specific sanitizer runtimes to create thread contexts and mark threads as created/running/joined etc. The class is based on the way we currently store thread contexts in TSan. llvm-svn: 177074
OpenPOWER on IntegriCloud