summaryrefslogtreecommitdiff
path: root/lib/tsan/dd
Commit message (Collapse)AuthorAgeFilesLines
* [CMake] Tidy up the organisation of compiler-rt when configured as a standaloneDan Liew2018-06-271-0/+2
| | | | | | | | | | | | | | | | | | | build with an IDE (e.g. Xcode) as the generator. Previously the global `USE_FOLDERS` property wasn't set in standalone builds leading to existing settings of FOLDER not being respected. In addition to this there were several targets that appeared at the top level that were not interesting and clustered up the view. These have been changed to be displayed in "Compiler-RT Misc". Now when an Xcode project is generated from a standalone compiler-rt build the project navigator is much less cluttered. The interesting libraries should appear in "Compiler-RT Libraries" in the IDE. Differential Revision: https://reviews.llvm.org/D48378 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@335728 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Build failures fixes post D45457Kostya Kortchinsky2018-04-161-0/+1
| | | | | | | | | | Summary: Adding a couple missed RTSanitizerCommonSymbolizer in makefiles. Subscribers: kubamracek, mgorny, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D45694 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@330134 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Move cxx-abi library earlier in link flags.Evgeniy Stepanov2017-10-041-3/+1
| | | | | | | | | | | | | | | | | | | | Summary: This change moves cxx-abi library in asan/ubsan/dd link command line ahead of other libraries, such as pthread/rt/dl/c/gcc. Given that cxx-abi may be the full libstdc++/libc++, it makes sense for it to be ahead of libc and libgcc, at least. The real motivation is Android, where in the arm32 NDK toolchain libstdc++.a is actually a linker script that tries to sneak LLVM's libunwind ahead of libgcc's. Wrong library order breaks unwinding. Reviewers: srhines, danalbert Subscribers: aemerson, kubamracek, mgorny, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D38520 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@314948 91177308-0d34-0410-b5e6-96231b3b80d8
* Support libc++abi in addition to libstdc++Petr Hosek2017-07-281-1/+2
| | | | | | | | | | | This change adds sanitizer support for LLVM's libunwind and libc++abi as an alternative to libstdc++. This allows using the in tree version of libunwind and libc++abi which is useful when building a toolchain for different target. Differential Revision: https://reviews.llvm.org/D34501 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309362 91177308-0d34-0410-b5e6-96231b3b80d8
* Support compiler-rt builtinsPetr Hosek2017-07-281-1/+4
| | | | | | | | | This change adds support for compiler-rt builtins as an alternative compiler runtime to libgcc. Differential Revision: https://reviews.llvm.org/D35165 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309361 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[sanitizer] Support compiler-rt builtins"Petr Hosek2017-07-261-4/+1
| | | | | | This reverts commit fd63314d6770e0da62572a3fea2c41c4cc0fc58a. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309083 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[sanitizer] Support libc++abi in addition to libstdc++"Petr Hosek2017-07-261-2/+1
| | | | | | This reverts commit d1997bff31cf6b484eb59c2ee1fc3155442e338c. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309082 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Support libc++abi in addition to libstdc++Petr Hosek2017-07-261-1/+2
| | | | | | | | | | | This change adds sanitizer support for LLVM's libunwind and libc++abi as an alternative to libstdc++. This allows using the in tree version of libunwind and libc++abi which is useful when building a toolchain for different target. Differential Revision: https://reviews.llvm.org/D34501 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309074 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Support compiler-rt builtinsPetr Hosek2017-07-251-1/+4
| | | | | | | | | This change adds support for compiler-rt builtins as an alternative compiler runtime to libgcc. Differential Revision: https://reviews.llvm.org/D35165 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309060 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor MemoryMappingLayout::Next to use a single struct instead of output ↵Francis Ricci2017-07-111-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | parameters. NFC. Summary: This is the first in a series of patches to refactor sanitizer_procmaps to allow MachO section information to be exposed on darwin. In addition, grouping all segment information in a single struct is cleaner than passing it through a large set of output parameters, and avoids the need for annotations of NULL parameters for unneeded information. The filename string is optional and must be managed and supplied by the calling function. This is to allow the MemoryMappedSegment struct to be stored on the stack without causing overly large stack sizes. Reviewers: alekseyshl, kubamracek, glider Subscribers: emaste, llvm-commits Differential Revision: https://reviews.llvm.org/D35135 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307688 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[sancov] moving sancov rt to sancov/ directory"Mike Aizatsky2017-01-121-2/+0
| | | | | | | | This reverts commit https://reviews.llvm.org/rL291734 Reason: mac breakage http://lab.llvm.org:8080/green//job/clang-stage1-configure-RA_build/28798/consoleFull#1657087648e9a0fee5-ebcc-4238-a641-c5aa112c323e git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@291736 91177308-0d34-0410-b5e6-96231b3b80d8
* [sancov] moving sancov rt to sancov/ directoryMike Aizatsky2017-01-121-0/+2
| | | | | | | | Subscribers: kubabrecka, mgorny Differential Revision: https://reviews.llvm.org/D28541 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@291734 91177308-0d34-0410-b5e6-96231b3b80d8
* [tsan] Switch to InternalAlloc everywhere __libc_malloc is currently usedKuba Brecka2016-06-061-3/+0
| | | | | | | | | | | | This patch replaces all uses of __libc_malloc and friends with the internal allocator. It seems that the only reason why we have calls to __libc_malloc in the first place was the lack of the internal allocator at the time. Using the internal allocator will also make sure that the system allocator is never used (this is the same behavior as ASan), and we don’t have to worry about working with unknown pointers coming from the system allocator. Differential Revision: http://reviews.llvm.org/D21025 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@271916 91177308-0d34-0410-b5e6-96231b3b80d8
* [cmake] Address Samsonov's post-commit review of r262723Filipe Cabecinhas2016-03-051-1/+1
| | | | | | | | | | Reviewers: samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D17896 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@262770 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] merge add_compiler_rt_runtime and add_compiler_rt_darwin_runtime ↵Chris Bieneman2015-08-251-7/+11
| | | | | | | | | | | | | | | | into a single function Summary: This refactoring moves much of the Apple-specific behavior into a function in AddCompilerRT. The next cleanup patch will remove more of the if(APPLE) checks in the outlying CMakeLists. This patch adds a bunch of new functionality to add_compiler_rt_runtime so that the target names don't need to be reconstructed outside the call. It also updates some of the call sites to exercise the new functionality, but does not update all uses fully. Subsequent patches will further update call sites and move to using the new features. Reviewers: filcab, bogner, kubabrecka, zaks.anna, glider, samsonov Subscribers: beanz, rengolin, llvm-commits Differential Revision: http://reviews.llvm.org/D12292 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@245970 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Stop using LLVM's custom parse_arguments. NFCFilipe Cabecinhas2015-06-191-1/+1
| | | | | | | | | | | | | | | | | | | | | Summary: Use CMake's cmake_parse_arguments() instead. It's called in a slightly different way, but supports all our use cases. It's in CMake 2.8.8, which is our minimum supported version. CMake 3.0 doc (roughly the same. No direct link to 2.8.8 doc): http://www.cmake.org/cmake/help/v3.0/module/CMakeParseArguments.html?highlight=cmake_parse_arguments Since I was already changing these calls, I changed ARCH and LIB into ARCHS and LIBS to make it more clear that they're lists of arguments. Reviewers: eugenis, samsonov, beanz Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10529 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240120 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Cleanup add_compiler_rt_object_library to be platform-agnosticChris Bieneman2015-06-101-1/+2
| | | | | | | | | | | | | | | | | Summary: This change takes darwin-specific goop that was scattered around CMakeLists files and spread between add_compiler_rt_object_library and add_compiler_rt_darwin_object_library and moves it all under add_compiler_rt_object_library. The goal of this is to try to push platform handling as low in the utility functions as possible. Reviewers: rnk, samsonov Reviewed By: rnk, samsonov Subscribers: rnk, rsmith, llvm-commits Differential Revision: http://reviews.llvm.org/D10250 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239498 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Add -lrt to dyndd link line.Evgeniy Stepanov2015-05-291-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238626 91177308-0d34-0410-b5e6-96231b3b80d8
* Use 'override/final' instead of 'virtual' for overridden methodsAlexander Kornienko2015-04-111-1/+1
| | | | | | | | | | | | | | The patch is generated using clang-tidy misc-use-override check. This command was used: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \ -checks='-*,misc-use-override' -header-filter='llvm|clang' -j=32 -fix \ -format git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@234680 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] Change InitializeFlags() signatures. NFC.Alexey Samsonov2015-02-121-4/+4
| | | | | | | These functions are always used to initialize singleton flags(), as well as other global data (common_flags()). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@228894 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Allow changing verbosity in activation flags.Evgeniy Stepanov2015-01-201-0/+1
| | | | | | | | This change removes some debug output in asan_flags.cc that was reading the verbosity level before all the flags were parsed. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226566 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Flag parser rewrite.Evgeniy Stepanov2015-01-151-2/+5
| | | | | | | | | The new parser is a lot stricter about syntax, reports unrecognized flags, and will make it easier to implemented some of the planned features. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226169 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Revert r224736: "[Sanitizer] Make CommonFlags immutable after ↵Alexey Samsonov2015-01-021-3/+7
| | | | | | | | | | | | | | | | initialization."" Fix test failures by introducing CommonFlags::CopyFrom() to make sure compiler doesn't insert memcpy() calls into runtime code. Original commit message: Protect CommonFlags singleton by adding const qualifier to common_flags() accessor. The only ways to modify the flags are SetCommonFlagsDefaults(), ParseCommonFlagsFromString() and OverrideCommonFlags() functions, which are only supposed to be called during initialization. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225088 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r224736: "[Sanitizer] Make CommonFlags immutable after initialization."Chandler Carruth2015-01-021-6/+3
| | | | | | | | | | We've got some internal users that either aren't compatible with this or have found a bug with it. Either way, this is an isolated cleanup and so I'm reverting it to un-block folks while we investigate. Alexey and I will be working on fixing everything up so this can be re-committed soon. Sorry for the noise and any inconvenience. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225079 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] Make CommonFlags immutable after initialization.Alexey Samsonov2014-12-221-3/+6
| | | | | | | | | | | | | | | | | | | Summary: Protect CommonFlags singleton by adding const qualifier to common_flags() accessor. The only ways to modify the flags are SetCommonFlagsDefaults(), ParseCommonFlagsFromString() and OverrideCommonFlags() functions, which are only supposed to be called during initialization. Test Plan: regression test suite Reviewers: kcc, eugenis, glider Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6741 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224736 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] Refactor CommonFlags interface. NFC.Alexey Samsonov2014-12-191-2/+2
| | | | | | | | | | Add CommonFlags::SetDefaults() and CommonFlags::ParseFromString(), so that this object can be easily tested. Enforce that ParseCommonFlagsFromString() and SetCommonFlagsDefaults() work only with singleton CommonFlags, shared across all sanitizer runtimes. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224617 91177308-0d34-0410-b5e6-96231b3b80d8
* [DD] Don't store the second copy of CommonFlags inside DDFlags.Alexey Samsonov2014-12-102-9/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223909 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Make sure dd is built as a part of compiler-rt.Alexey Samsonov2014-12-101-17/+4
| | | | | | | Remove unused variables and definitions in CMake files for TSan and DD (deadlock detector). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223908 91177308-0d34-0410-b5e6-96231b3b80d8
* Change StackDepot interface to use StackTrace more extensivelyAlexey Samsonov2014-10-261-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220637 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixup deadlock sanitizer after r220635Alexey Samsonov2014-10-261-4/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220636 91177308-0d34-0410-b5e6-96231b3b80d8
* [compiler-rt] compiler-rt's CMake append_if function clashes with LLVM's, ↵Kuba Brecka2014-10-151-2/+2
| | | | | | | | | | | | let's rename it to append_list_if Doing s/append_if/append_list_if/, no functional change. http://reviews.llvm.org/D5739 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@219860 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not link the dyndd runtime library against libdl on FreeBSDViktor Kutuzov2014-09-171-1/+5
| | | | | | | Differential Revision: http://reviews.llvm.org/D5207 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@217944 91177308-0d34-0410-b5e6-96231b3b80d8
* [Deadlock detector] Fix CMake build rules for shared runtimeAlexey Samsonov2014-06-051-12/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@210232 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: serialize report printing in standalone deadlock detectorDmitry Vyukov2014-04-112-1/+2
| | | | | | | | otherwise reports get intermixed git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@206043 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Rename add_compiler_rt_static_runtime to add_compiler_rt_runtime.Alexey Samsonov2014-03-311-1/+1
| | | | | | | | | | Soon there will be an option to build compiler-rt parts as shared libraries on Linux. Extracted from http://llvm-reviews.chandlerc.com/D3042 by Yuri Gribov. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@205183 91177308-0d34-0410-b5e6-96231b3b80d8
* [libsanitizer] Introduce flag descriptions.Alexander Potapenko2014-03-201-1/+1
| | | | | | | | | | Extend ParseFlag to accept the |description| parameter, add dummy values for all existing flags. As the flags are parsed their descriptions are stored in a global linked list. The tool can later call __sanitizer::PrintFlagDescriptions() to dump all the flag names and their descriptions. Add the 'help' flag and make ASan, TSan and MSan print the flags if 'help' is set to 1. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204339 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: use attribute instead of compiler flag for tls-model=initial-exec as ↵Dmitry Vyukov2014-03-192-1/+2
| | | | | | asked in comments for r203111 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204232 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: deadlock detector: add deadlock detector flagsDmitry Vyukov2014-03-182-8/+31
| | | | | | | | the first flags is to enable printing of the second stack per edge git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204150 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: deadlock detector: print 2 stacks per deadlock edgeDmitry Vyukov2014-03-181-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204149 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: deadlock detector: add ability to ignore destruction of global mutexesDmitry Vyukov2014-03-181-2/+33
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204146 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: lazily initialize deadlock detector runtimeDmitry Vyukov2014-03-181-13/+43
| | | | | | | | this is necessaary because dlsym can call malloc, which can lock mutexes that we intercept git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204141 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: support up to 1<<20 mutexes in standalone deadlock detectorDmitry Vyukov2014-03-181-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204127 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: add missing interceptor for embed symbolizerDmitry Vyukov2014-03-181-0/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204124 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] fix the deadlock detector buildKostya Serebryany2014-03-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204044 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: add -ftls-model=initial-exec to deadlock detector flagsDmitry Vyukov2014-03-061-0/+1
| | | | | | | | one way or another it must present in the process from the beginning git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@203111 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: better error message wording in deadlock reportsDmitry Vyukov2014-03-061-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@203109 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: fix deadlock detector build for SANITIZER_DEADLOCK_DETECTOR_VERSION=2Dmitry Vyukov2014-03-051-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202977 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: implement new version of standalong deadlock detectorDmitry Vyukov2014-03-054-55/+178
| | | | | | | | | intercept pthread_cond (it is required to properly track state of mutexes) detect cycles in mutex graph git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202975 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: add interceptors for pthread_spinlock_t and ptread_rwlock_t for ↵Dmitry Vyukov2014-03-051-7/+102
| | | | | | deadlock detector git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202947 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: add dynamic library target for standalone deadlock detectorDmitry Vyukov2014-03-044-4/+31
| | | | | | | | | it's LD_PRELOAD-able git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202843 91177308-0d34-0410-b5e6-96231b3b80d8