summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Shorten sanitizer plugin namesPavel Labath2017-06-261-1066/+0
| | | | | | | | | | | | | | | | | | | | | | | Summary: The new UndefinedBehaviorSanitizer plugin was breaking file path length limits, because it's (fairly long name) appears multiple times in the path. Cmake ends up putting the object file at path tools/lldb/source/Plugins/InstrumentationRuntime/UndefinedBehaviorSanitizer/CMakeFiles/lldbPluginInstrumentationRuntimeUndefinedBehaviorSanitizer.dir/UndefinedBehaviorSanitizerRuntime.cpp.obj which is 191 characters long and very dangerously close to the 260 character path limit on windows systems (also, just the include line for that file was breaking the 80 character line limit). This renames the sanitizer plugins to use shorter names (asan, ubsan, tsan). I think this will still be quite understandable to everyone as those are the names everyone uses to refer to them anyway. Reviewers: zturner, kubamracek, jingham Subscribers: lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D34553 llvm-svn: 306278
* Upstreaming the UndefinedBehaviorSanitizerRuntime and ↵Kuba Mracek2017-06-161-5/+0
| | | | | | MainThreadCheckerRuntime plugins. llvm-svn: 305589
* Rename Error -> Status.Zachary Turner2017-05-121-2/+2
| | | | | | | | | | | | | | | This renames the LLDB error class to Status, as discussed on the lldb-dev mailing list. A change of this magnitude cannot easily be done without find and replace, but that has potential to catch unwanted occurrences of common strings such as "Error". Every effort was made to find all the obvious things such as the word "Error" appearing in a string, etc, but it's possible there are still some lingering occurences left around. Hopefully nothing too serious. llvm-svn: 302872
* ThreadSanitizer plugin: match for loop variable with expected typeEd Maste2017-04-221-1/+1
| | | | | | | | Removes Clang warning ThreadSanitizerRuntime.cpp:591:21: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare] llvm-svn: 301067
* ThreadSanitizer plugin: Support Swift access races and fix how external ↵Kuba Mracek2017-04-161-16/+37
| | | | | | races are displayed. llvm-svn: 300416
* [lldb] Add support for "external" reports in ThreadSanitizer LLDB pluginKuba Mracek2017-02-161-2/+31
| | | | | | | | TSan now has the ability to report races on "external" object, i.e. any library class/object that has read-shared write-exclusive threading semantics. The detection and reporting work almost out of the box, but TSan can now provide the type of the object (as a string). This patch implements this into LLDB. Differential Revision: https://reviews.llvm.org/D30024 llvm-svn: 295342
* Move classes from Core -> Utility.Zachary Turner2017-02-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | This moves the following classes from Core -> Utility. ConstString Error RegularExpression Stream StreamString The goal here is to get lldbUtility into a state where it has no dependendencies except on itself and LLVM, so it can be the starting point at which to start untangling LLDB's dependencies. These are all low level and very widely used classes, and previously lldbUtility had dependencies up to lldbCore in order to use these classes. So moving then down to lldbUtility makes sense from both the short term and long term perspective in solving this problem. Differential Revision: https://reviews.llvm.org/D29427 llvm-svn: 293941
* Stop limiting the number of TSan backtrace size to 8Kuba Mracek2017-01-101-1/+2
| | | | | | | | We currently limit the length of TSan returned backtraces to 8, which is not necessary (and a bug, most likely). Let's remove this. Differential Revision: https://reviews.llvm.org/D28035 llvm-svn: 291522
* Use Timeout<> in EvaluateExpressionOptions classPavel Labath2016-12-061-2/+2
| | | | llvm-svn: 288797
* Fix Clang-tidy readability-redundant-string-cstr warningsMalcolm Parsons2016-11-021-1/+1
| | | | | | | | | | Reviewers: zturner, labath Subscribers: tberghammer, danalbert, lldb-commits Differential Revision: https://reviews.llvm.org/D26233 llvm-svn: 285855
* Make lldb::Regex use StringRef.Zachary Turner2016-09-211-1/+1
| | | | | | | | | | This updates getters and setters to use StringRef instead of const char *. I tested the build on Linux, Windows, and OSX and saw no build or test failures. I cannot test any BSD or Android variants, however I expect the required changes to be minimal or non-existant. llvm-svn: 282079
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-061-584/+760
| | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
* [InstrumentationRuntime] Refactor the API (Part 2/N) (NFCI)Vedant Kumar2016-08-111-42/+14
| | | | | | | | | Factor out some common logic used to find the runtime library in a list of modules. Differential Revision: https://reviews.llvm.org/D23150 llvm-svn: 278368
* [InstrumentationRuntime] Refactor the API (Part 1/N) (NFCI)Vedant Kumar2016-08-111-24/+8
| | | | | | | | | | | | | | | | | Adapters for instrumentation runtimes have to do two basic things: 1) Load a runtime library. 2) Install breakpoints in that library. This logic is duplicated in the adapters for asan and tsan. Factor it out and document bits of it to make it easier to add new adapters. I tested this with check-lldb, and double-checked testcases/functionalities/{a,t}san. Differential Revision: https://reviews.llvm.org/D23043 llvm-svn: 278367
* [lldb][tsan] Perform one map lookup instead of two (NFC)Vedant Kumar2016-08-011-2/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D22983 llvm-svn: 277350
* [lldb][tsan] Avoid a string copy (NFC)Vedant Kumar2016-08-011-5/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D22984 llvm-svn: 277347
* In AddressSanitizer and ThreadSanitizer, let's explicitly set the language ↵Kuba Brecka2016-07-061-0/+2
| | | | | | of the expression we're evaluating. llvm-svn: 274621
* [tsan] Prefer mangled name looking up variable declaration for racy addressDevin Coughlin2016-06-011-1/+1
| | | | | | | | | | | | | | | | For Thread Sanitizer reports, LLDB tries to find a global variable declaration corresponding to the racy address in order to provide a filename and line number. This commit changes the lookup of the variable to use the mangled name for lookup and fall back to the demangled version if unavailable. This is needed to report locations of races on Swift global variables. I've also added a test to make sure we look up C++ globals correctly. rdar://problem/26459401 Differential Revision: http://reviews.llvm.org/D20760 llvm-svn: 271433
* Reword the "Happened at" TSan-reported thread to contain a thread id.Kuba Brecka2016-05-241-2/+5
| | | | llvm-svn: 270608
* Improve wording in TSan reports involving global variables. Don't repeat ↵Kuba Brecka2016-05-241-11/+42
| | | | | | hex addresses that are the same. llvm-svn: 270588
* Reword ThreadSanitizer messages to use a lowercase 't' in thread names when ↵Kuba Brecka2016-05-221-5/+5
| | | | | | in the middle of a sentence. llvm-svn: 270365
* Reword ThreadSanitizer message for invalid mutex reports.Kuba Brecka2016-05-221-1/+1
| | | | llvm-svn: 270364
* Improve wording and capitalization of TSan thread names.Kuba Brecka2016-05-011-7/+7
| | | | llvm-svn: 268193
* Provide location information (file name, line number) in TSan reports about ↵Kuba Brecka2016-04-281-2/+44
| | | | | | global variables. llvm-svn: 267894
* Renumber ThreadSanitizer-provided thread IDs to match LLDB thread numbers.Kuba Brecka2016-04-221-17/+47
| | | | llvm-svn: 267133
* Provide more information in ThreadSanitizer's JSON data. Move remaining ↵Kuba Brecka2016-04-101-19/+260
| | | | | | TSan logic from SBThread to InstrumentationRuntime plugin. llvm-svn: 265905
* Fix the ThreadSanitizer support to avoid creating empty SBThreads and to not ↵Kuba Brecka2016-03-301-1/+1
| | | | | | crash when thread_id is unavailable. Plus a whitespace fix. llvm-svn: 264854
* Fix warning in ThreadSanitizerRuntimePavel Labath2016-03-301-1/+1
| | | | llvm-svn: 264849
* Add ThreadSanitizer debugging support.Kuba Brecka2016-03-231-0/+538
This patch adds ThreadSanitizer support into LLDB: - Adding a new InstrumentationRuntime plugin, ThreadSanitizerRuntime, in the same way ASan is implemented. - A breakpoint stops in `__tsan_on_report`, then we extract all sorts of information by evaluating an expression. We then populate this into StopReasonExtendedInfo. - SBThread gets a new API, SBThread::GetStopReasonExtendedBacktraces(), which returns TSan’s backtraces in the form of regular SBThreads. Non-TSan stop reasons return an empty collection. - Added some test cases. Reviewed by Greg Clayton. llvm-svn: 264162
OpenPOWER on IntegriCloud