summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/tsan/rtl/tsan_external.cc
Commit message (Collapse)AuthorAgeFilesLines
* compiler-rt: Rename .cc file in lib/tsan/rtl to .cppNico Weber2019-08-011-124/+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] Detect races on modifying accesses in Swift codeKuba Mracek2017-05-031-8/+39
| | | | | | | | 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
* [tsan] Track external tags in thread tracesKuba Mracek2017-04-301-8/+21
| | | | | | | | To make the TSan external API work with Swift and other use cases, we need to track "tags" for individual memory accesses. Since there is no space to store this information in shadow cells, let's use the thread traces for that. This patch stores the tag as an extra frame in the stack traces (by calling FuncEntry and FuncExit with the address of a registered tag), this extra frame is then stripped before printing the backtrace to stderr. Differential Revision: https://reviews.llvm.org/D32382 llvm-svn: 301777
* [tsan] Refactor __tsan_external_read/__tsan_external_write to avoid code ↵Kuba Mracek2017-04-211-20/+16
| | | | | | | | | | duplication Let's introduce a ExternalAccess function that has the shared code only once. Differential Revision: https://reviews.llvm.org/D32360 llvm-svn: 301008
* [tsan] Track external API accesses as 1-byte accesses (instead of 8-byte)Kuba Mracek2017-04-211-2/+2
| | | | | | | | It doesn't really make sense to track them as 8-byte accesses. Differential Revision: https://reviews.llvm.org/D32359 llvm-svn: 301001
* [tsan] Ignore memory accesses for libignored modules for "external" racesKuba Mracek2017-04-211-6/+13
| | | | | | | | On Darwin, the setting ignore_noninstrumented_modules is used to suppress false positives in code that users don't have control of. The recently added "external" API (which can be used to detect races on objects provided by system libraries, but the race is actually user's fault) ignores this flag and it can report issues in non-instrumented modules. This patch fixes that. Differential Revision: https://reviews.llvm.org/D31553 llvm-svn: 301000
* [tsan] Provide API for libraries for race detection on custom objectsKuba Mracek2017-02-021-0/+78
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
OpenPOWER on IntegriCloud