Alexey Samsonov
b3053d9cbe
Allow UBSan+MSan and UBSan+TSan combinations (Clang part).
...
Embed UBSan runtime into TSan and MSan runtimes in the same as we do
in ASan. Extend UBSan test suite to also run tests for these
combinations.
llvm-svn: 235954
2015-04-28 00:56:48 +00:00
Alexey Samsonov
56d6fc81a5
Introduce tsan_cxx and msan_cxx libraries (compiler-rt part).
...
For now tsan_cxx and msan_cxx contain only operator new/delete
replacements. In the future, when we add support for running UBSan+TSan
and UBSan+MSan, they will also contain bits ubsan_cxx runtime.
llvm-svn: 235928
2015-04-27 22:08:09 +00:00
Alexey Samsonov
0eafe5df71
[TSan] Move new/delete interceptors into a separate source file. NFC.
...
llvm-svn: 235906
2015-04-27 19:33:55 +00:00
Alexey Samsonov
1f5bcbe918
Re-land part of r230171: fix GoTsanRuntimeCheck with ccache.
...
llvm-svn: 230247
2015-02-23 19:35:42 +00:00
Dmitri Gribenko
9cbc6f42aa
Revert r230171 "TSan runtime: unbreak the build with ccache"
...
It broke a buildbot with a non-clang (?) compiler.
llvm-svn: 230174
2015-02-22 12:20:05 +00:00
Dmitri Gribenko
bc4c42c345
TSan runtime: unbreak the build with ccache
...
llvm-svn: 230171
2015-02-22 11:04:59 +00:00
Mohit K. Bhakkad
a46d5a7438
[TSan][MIPS] Adding support for MIPS64
...
Patch by Sagar Thakur
Reviewers: dvyukov, samsonov, petarj, kcc, dsanders.
Subscribers: mohit.bhakkad, Anand.Takale, llvm-commits.
Differential Revision: http://reviews.llvm.org/D6291
llvm-svn: 229972
2015-02-20 06:42:41 +00:00
Alexey Samsonov
1270c530e8
[TSan] Fix Go sanity check script.
...
llvm-svn: 227870
2015-02-02 22:07:39 +00:00
Alexey Samsonov
46fe4a640d
[TSan] Add Go runtime sanity check to CMake build.
...
llvm-svn: 227852
2015-02-02 20:37:28 +00:00
Alexey Samsonov
c91ffd2c8f
[TSan] Build runtime with -msse3 flag.
...
llvm-svn: 227850
2015-02-02 20:37:25 +00:00
Alexey Samsonov
03499e920b
[Sanitizer] Change the runtime flag representation.
...
This mirrors r225239 to all the rest sanitizers:
ASan, DFSan, LSan, MSan, TSan, UBSan.
Now the runtime flag type, name, default value and
description is located in the single place in the
.inc file.
llvm-svn: 225327
2015-01-07 00:38:00 +00:00
Alexey Samsonov
df3aeb8e71
Remove TSAN_DEBUG in favor of SANITIZER_DEBUG.
...
llvm-svn: 225111
2015-01-03 04:29:12 +00:00
Alexey Samsonov
c2485cab33
[CMake] Make sure dd is built as a part of compiler-rt.
...
Remove unused variables and definitions in CMake files
for TSan and DD (deadlock detector).
llvm-svn: 223908
2014-12-10 02:14:15 +00:00
Kuba Brecka
14c0c5901d
[compiler-rt] compiler-rt's CMake append_if function clashes with LLVM's, let's rename it to append_list_if
...
Doing s/append_if/append_list_if/, no functional change.
http://reviews.llvm.org/D5739
llvm-svn: 219860
2014-10-15 22:47:54 +00:00
Alexey Samsonov
16ea3268b2
Build libcxx-tsan only if TSan is supported on host architecture
...
llvm-svn: 213791
2014-07-23 20:07:26 +00:00
Alexey Samsonov
3a2cb3ad41
[TSan] Fix a bug in libcxx-tsan build conditions spotted by Ryuta Suzuki
...
llvm-svn: 212749
2014-07-10 18:17:51 +00:00
Dmitry Vyukov
bde4c9c773
tsan: refactor storage of meta information for heap blocks and sync objects
...
The new storage (MetaMap) is based on direct shadow (instead of a hashmap + per-block lists).
This solves a number of problems:
- eliminates quadratic behaviour in SyncTab::GetAndLock (https://code.google.com/p/thread-sanitizer/issues/detail?id=26 )
- eliminates contention in SyncTab
- eliminates contention in internal allocator during allocation of sync objects
- removes a bunch of ad-hoc code in java interface
- reduces java shadow from 2x to 1/2x
- allows to memorize heap block meta info for Java and Go
- allows to cleanup sync object meta info for Go
- which in turn enabled deadlock detector for Go
llvm-svn: 209810
2014-05-29 13:50:54 +00:00
Alexey Samsonov
36132035ca
[CMake] Don't build libcxx_tsan with compilers other than Clang
...
llvm-svn: 209003
2014-05-16 18:22:04 +00:00
Alexey Samsonov
5716928ae2
[TSan] Build TSan-instrumented version of libcxx and use it in lit tests.
...
TSan can produce false positives in code that uses C++11 threading,
as it doesn't see synchronization inside standard library. See
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-February/035408.html
for an example of such case.
We may build custom TSan-instrumented version libcxx to fight with that.
This change adds build rules for libcxx_tsan and integrates it into
testing infrastructure.
llvm-svn: 208737
2014-05-13 22:30:16 +00:00
Alexey Samsonov
78a8435fd6
[CMake] Rename add_compiler_rt_static_runtime to add_compiler_rt_runtime.
...
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.
llvm-svn: 205183
2014-03-31 13:45:36 +00:00
Alexey Samsonov
32956d651a
[CMake] Make append_if semantics similar to those used in LLVM
...
llvm-svn: 203773
2014-03-13 09:31:36 +00:00
Alexey Samsonov
11705b2f10
[CMake] break dependency between unit tests and runtimes in standalone build
...
llvm-svn: 201778
2014-02-20 12:03:56 +00:00
Alexey Samsonov
cd8535a96d
[CMake] Introduce COMPILER_RT_INCLUDE_TESTS option
...
llvm-svn: 201666
2014-02-19 11:18:47 +00:00
Alexey Samsonov
63a4af7346
[CMake] Add top-level target for each compiler-rt library, and add 'compiler-rt' target encompassing them all.
...
llvm-svn: 201556
2014-02-18 09:33:45 +00:00
Alexey Samsonov
878a9a5de2
[CMake] Check for -fPIE and -ffreestanding flags for consistency
...
llvm-svn: 201549
2014-02-18 08:07:09 +00:00
Alexey Samsonov
b73db72a17
[CMake] Simplify setting compile flag disabling RTTI
...
llvm-svn: 201547
2014-02-18 07:52:40 +00:00
Alexey Samsonov
9a1ffce25a
[CMake] Simplify code for detecting/setting compiler flags
...
llvm-svn: 201543
2014-02-18 07:26:58 +00:00
Alexey Samsonov
e6a6183e9b
Move TSan lit-tests under test/tsan
...
llvm-svn: 201414
2014-02-14 14:35:48 +00:00
Alexey Samsonov
ce9c449a4d
[TSan] Kill tsan_symbolize_addr2line_linux.cc
...
llvm-svn: 201219
2014-02-12 08:37:09 +00:00
Alexey Samsonov
167c15a98f
[Sanitizer] Build sanitizer_common with -Wframe-larger-than=512 flag
...
llvm-svn: 201213
2014-02-12 07:26:40 +00:00
Dmitry Vyukov
3238e1c913
tsan: better diagnostics if thread finishes with ignores enabled
...
print thread creation stack
and stacks where ignores were enabled.
llvm-svn: 195836
2013-11-27 11:30:28 +00:00
Alexey Samsonov
06379b3537
[TSan] Add a couple of compiler warnings to TSan runtime compile flags
...
llvm-svn: 189581
2013-08-29 12:08:36 +00:00
Alexey Samsonov
ab7ff52efd
[TSan] Move build rules a bit to ensure correct dependencies of check-tsan command
...
llvm-svn: 189579
2013-08-29 11:53:11 +00:00
Alexander Potapenko
b042555cd3
[TSan] Build TSan runtime with -fPIE.
...
This removes all register spills from the performance-critical __tsan_{read,write}{1,2,4,8} functions when the host compiler is GCC.
llvm-svn: 178340
2013-03-29 09:44:11 +00:00
Alexey Samsonov
d7ab381f53
[Sanitizer] Build ASan, TSan and MSan runtimes with -fno-rtti.
...
llvm-svn: 176940
2013-03-13 09:18:30 +00:00
Alexey Samsonov
0fa3ea69e2
[TSan] move: rtl_tests->tests/rtl unit_tests->tests/unit to make a single root for gtest-based tests. Support running these tests from lit via check-tsan command.
...
llvm-svn: 164022
2012-09-17 10:02:17 +00:00
Alexey Samsonov
2b8de6a753
[TSan] support building TSan unittests in CMake
...
llvm-svn: 163797
2012-09-13 14:04:57 +00:00
Alexey Samsonov
255f6a5f1a
[TSan] Add initial support for buidling ThreadSanitizer runtime library with CMake (currently the only supported platfrom is 64-bit Linux). This patch makes 'clang++ -fthread-sanitizer' work for both clang in the build tree and installed clang
...
llvm-svn: 163789
2012-09-13 12:18:41 +00:00
Kostya Serebryany
c9fd917b36
[tsan] makefile machinery to build tsan-rt (linux-x86_64 only)
...
llvm-svn: 156822
2012-05-15 15:17:35 +00:00