Commit Graph

475 Commits

Author SHA1 Message Date
Kuba Brecka
4f349ace2b [asan] Speed up compilation of large C++ stringmaps (tons of allocas) with ASan
This addresses PR30746, <https://llvm.org/bugs/show_bug.cgi?id=30746>. The ASan pass iterates over entry-block instructions and checks each alloca whether it's in NonInstrumentedStaticAllocaVec, which is apparently slow. This patch gathers the instructions to move during visitAllocaInst.

Differential Revision: https://reviews.llvm.org/D26380



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286296 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-08 21:30:41 +00:00
Kuba Brecka
8882bb7633 [tsan] Cast floating-point types correctly when instrumenting atomic accesses, LLVM part
Although rare, atomic accesses to floating-point types seem to be valid, i.e. `%a = load atomic float ...`. The TSan instrumentation pass however tries to emit inttoptr, which is incorrect, we should use a bitcast here. Anyway, IRBuilder already has a convenient helper function for this.

Differential Revision: https://reviews.llvm.org/D26266



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286135 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-07 19:09:56 +00:00
Kuba Brecka
588bf7bf31 [asan] Move instrumented null-terminated strings to a special section, LLVM part
On Darwin, simple C null-terminated constant strings normally end up in the __TEXT,__cstring section of the resulting Mach-O binary. When instrumented with ASan, these strings are transformed in a way that they cannot be in __cstring (the linker unifies the content of this section and strips extra NUL bytes, which would break instrumentation), and are put into a generic __const section. This breaks some of the tools that we have: Some tools need to scan all C null-terminated strings in Mach-O binaries, and scanning all the contents of __const has a large performance penalty. This patch instead introduces a special section, __asan_cstring which will now hold the instrumented null-terminated strings.

Differential Revision: https://reviews.llvm.org/D25026



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285619 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-31 18:51:58 +00:00
Vedant Kumar
d950fb2fa8 [Coverage] Darwin: Move __llvm_covmap from __DATA to __LLVM_COV
Programs with very large __llvm_covmap sections may fail to link on
Darwin because because of out-of-range 32-bit RIP relative references.
It isn't possible to work around this by using the large code model
because it isn't supported on Darwin. One solution is to move the
__llvm_covmap section past the end of the __DATA segment.

=== Testing ===

In addition to check-{llvm,clang,profile}, I performed a link test on a
simple object after injecting ~4GB of padding into __llvm_covmap:

  @__llvm_coverage_padding = internal constant [4000000000 x i8] zeroinitializer, section "__LLVM_COV,__llvm_covmap", align 8

(This test is too expensive to check-in.)

=== Backwards Compatibility ===

This patch should not pose any backwards-compatibility concerns. LLVM
is expected to scan all of the sections in a binary for __llvm_covmap,
so changing its segment shouldn't affect anything. I double-checked this
by loading coverage produced by an unpatched compiler with a patched
llvm-cov.

Suggested by Nick Kledzik.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285360 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-27 23:17:51 +00:00
Vitaly Buka
298a3d2a9a [asan] Append line number to variable name if line is available and in the same file as the function.
PR30498

Reviewers: eugenis

Differential Revision: https://reviews.llvm.org/D25715

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284546 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-18 23:29:41 +00:00
Vitaly Buka
9161c6d6d4 [asan] Rename test file as the poisoning is not "experimental"
Reviewers: eugenis

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D25737

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284507 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-18 18:05:06 +00:00
Vitaly Buka
1914a4055e [asan] Combine check-prefixes in stack-poisoning test
Reviewers: eugenis

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D25736

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284506 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-18 18:05:04 +00:00
Vitaly Buka
7439986077 [asan] Make -asan-experimental-poisoning the only behavior
Reviewers: eugenis

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D25735

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284505 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-18 18:04:59 +00:00
Vedant Kumar
426fd51c83 [InstrProf] Add support for dead_strip+live_support functionality
On Darwin, marking a section as "regular,live_support" means that a
symbol in the section should only be kept live if it has a reference to
something that is live. Otherwise, the linker is free to dead-strip it.

Turn this functionality on for the __llvm_prf_data section.

This means that counters and data associated with dead functions will be
removed from dead-stripped binaries. This will result in smaller
profiles and binaries, and should speed up profile collection.

Tested with check-profile, llvm-lit test/tools/llvm-{cov,profdata}, and
check-llvm.

Differential Revision: https://reviews.llvm.org/D25456

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283947 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-11 21:48:16 +00:00
Kostya Serebryany
21fcbebddd [sanitizer-coverage] use private linkage for coverage guards, delete old commented-out code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283924 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-11 19:36:50 +00:00
Mehdi Amini
090f75dc83 [ASAN] Add the binder globals on Darwin to llvm.compiler.used to avoid LTO dead-stripping
The binder is in a specific section that "reverse" the edges in a
regular dead-stripping: the binder is live as long as a global it
references is live.

This is a big hammer that prevents LLVM from dead-stripping these,
while still allowing linker dead-stripping (with special knowledge
of the section).

Differential Revision: https://reviews.llvm.org/D24673

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282988 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-01 00:05:34 +00:00
Etienne Bergeron
937044fdd2 [asan] Support dynamic shadow address instrumentation
Summary:
This patch is adding the support for a shadow memory with
dynamically allocated address range.

The compiler-rt needs to export a symbol containing the shadow
memory range.

This is required to support ASAN on windows 64-bits.

Reviewers: kcc, rnk, vitalybuka

Subscribers: zaks.anna, kubabrecka, dberris, llvm-commits, chrisha

Differential Revision: https://reviews.llvm.org/D23354

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282881 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-30 17:46:32 +00:00
Kostya Serebryany
efa54824a3 [sanitizer-coverage/libFuzzer] make the guards for trace-pc 32-bit; create one array of guards per function, instead of one guard per BB. reorganize the code so that trace-pc-guard does not create unneeded globals
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282735 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-29 17:43:24 +00:00
Kostya Serebryany
30eb92316c [sanitizer-coverage] fix a bug in trace-gep
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282467 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-27 01:55:08 +00:00
Kostya Serebryany
dbadbd797d [sanitizer-coverage] don't emit the CTOR function if nothing has been instrumented
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282465 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-27 01:08:33 +00:00
Sagar Thakur
5b1a39068c [EfficiencySanitizer] Using '$' instead of '#' for struct counter name
For MIPS '#' is the start of comment line. Therefore we get assembler errors if # is used in the structure names.

Differential: D24334
Reviewed by: zhaoqin


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282141 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-22 08:33:06 +00:00
Nico Weber
5f630a9121 revert 281908 because 281909 got reverted
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282097 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-21 18:25:43 +00:00
Adrian Prantl
3051c6d512 ASAN: Don't drop debug info attachements for global variables.
This is a follow-up to r281284. Global Variables now can have
!dbg attachements, so ASAN should clone these when generating a
sanitized copy of a global variable.

<rdar://problem/24899262>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281994 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-20 18:28:42 +00:00
Kostya Serebryany
18f63e47d8 [sanitizer-coverage] add comdat to coverage guards if needed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281952 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-20 00:16:54 +00:00
Etienne Bergeron
b87b0d3795 [asan] Support dynamic shadow address instrumentation
Summary:
This patch is adding the support for a shadow memory with
dynamically allocated address range.

The compiler-rt needs to export a symbol containing the shadow
memory range.

This is required to support ASAN on windows 64-bits.

Reviewers: kcc, rnk, vitalybuka

Subscribers: kubabrecka, dberris, llvm-commits, chrisha

Differential Revision: https://reviews.llvm.org/D23354

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281908 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-19 15:58:38 +00:00
Kostya Serebryany
16197d80b6 [sanitizer-coverage] change trace-pc to use 8-byte guards
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281809 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-17 05:03:05 +00:00
Vitaly Buka
d26bf22afc Revert "[asan] Avoid lifetime analysis for allocas with can be in ambiguous state"
This approach is not good enough. Working on the new solution.

This reverts commit r280907.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281689 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-16 01:38:46 +00:00
Vitaly Buka
1354d58f56 Revert "[asan] Add flag to allow lifetime analysis of problematic allocas"
This approach is not good enough. Working on the new solution.

This reverts commit r281126.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281688 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-16 01:38:43 +00:00
Kostya Serebryany
31daa34b7b [sanitizer-coverage] make trace-pc-guard and indirect-call work together
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281665 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-15 22:11:08 +00:00
Etienne Bergeron
28f64ff6ba address comments from: https://reviews.llvm.org/D24566
using startswith instead of find.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281617 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-15 15:19:19 +00:00
Etienne Bergeron
24624732a0 [compiler-rt] Avoid instrumenting sanitizer functions
Summary:
Function __asan_default_options is called by __asan_init before the
shadow memory got initialized. Instrumenting that function may lead
to flaky execution.

As the __asan_default_options is provided by users, we cannot expect
them to add the appropriate function atttributes to avoid
instrumentation.

Reviewers: kcc, rnk

Subscribers: dberris, chrisha, llvm-commits

Differential Revision: https://reviews.llvm.org/D24566

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281503 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 17:18:37 +00:00
Kostya Serebryany
8ea4234809 [sanitizer-coverage] add yet another flavour of coverage instrumentation: trace-pc-guard. The intent is to eventually replace all of {bool coverage, 8bit-counters, trace-pc} with just this one. LLVM part
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281431 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 01:39:35 +00:00
Vitaly Buka
c4644d2241 [asan] Add flag to allow lifetime analysis of problematic allocas
Summary:
Could be useful for comparison when we suspect that alloca was skipped
because of this.

Reviewers: eugenis

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D24437

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281126 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-10 01:06:11 +00:00
Dehao Chen
961ef79d43 Do not widen load for different variable in GVN.
Summary:
Widening load in GVN is too early because it will block other optimizations like PRE, LICM.

https://llvm.org/bugs/show_bug.cgi?id=29110

The SPECCPU2006 benchmark impact of this patch:

Reference: o2_nopatch
(1): o2_patched

           Benchmark             Base:Reference   (1)  
-------------------------------------------------------
spec/2006/fp/C++/444.namd                  25.2  -0.08%
spec/2006/fp/C++/447.dealII               45.92  +1.05%
spec/2006/fp/C++/450.soplex                41.7  -0.26%
spec/2006/fp/C++/453.povray               35.65  +1.68%
spec/2006/fp/C/433.milc                   23.79  +0.42%
spec/2006/fp/C/470.lbm                    41.88  -1.12%
spec/2006/fp/C/482.sphinx3                47.94  +1.67%
spec/2006/int/C++/471.omnetpp             22.46  -0.36%
spec/2006/int/C++/473.astar               21.19  +0.24%
spec/2006/int/C++/483.xalancbmk           36.09  -0.11%
spec/2006/int/C/400.perlbench             33.28  +1.35%
spec/2006/int/C/401.bzip2                 22.76  -0.04%
spec/2006/int/C/403.gcc                   32.36  +0.12%
spec/2006/int/C/429.mcf                   41.04  -0.41%
spec/2006/int/C/445.gobmk                 26.94  +0.04%
spec/2006/int/C/456.hmmer                  24.5  -0.20%
spec/2006/int/C/458.sjeng                    28  -0.46%
spec/2006/int/C/462.libquantum            55.25  +0.27%
spec/2006/int/C/464.h264ref               45.87  +0.72%

geometric mean                                   +0.23%

For most benchmarks, it's a wash, but we do see stable improvements on some benchmarks, e.g. 447,453,482,400.

Reviewers: davidxl, hfinkel, dberlin, sanjoy, reames

Subscribers: gberry, junbuml

Differential Revision: https://reviews.llvm.org/D24096

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281074 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-09 18:42:35 +00:00
Vitaly Buka
52bc7ab5ec [asan] Avoid lifetime analysis for allocas with can be in ambiguous state
Summary:
C allows to jump over variables declaration so lifetime.start can be
avoid before variable usage. To avoid false-positives on such rare cases
we detect them and remove from lifetime analysis.

PR27453
PR28267

Reviewers: eugenis

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D24321

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280907 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-08 06:27:58 +00:00
Vitaly Buka
f555e2686a Revert "[asan] Avoid lifetime analysis for allocas with can be in ambiguous state"
Fails on Windows.

This reverts commit r280880.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280883 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-07 23:37:15 +00:00
Vitaly Buka
f8002f1611 [asan] Avoid lifetime analysis for allocas with can be in ambiguous state
Summary:
C allows to jump over variables declaration so lifetime.start can be
avoid before variable usage. To avoid false-positives on such rare cases
we detect them and remove from lifetime analysis.

PR27453
PR28267

Reviewers: eugenis

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D24321

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280880 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-07 23:18:23 +00:00
Kostya Serebryany
8c23b334cd [sanitizer-coverage] add two more modes of instrumentation: trace-div and trace-gep, mostly usaful for value-profile-based fuzzing; llvm part
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280043 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-30 01:12:10 +00:00
Vitaly Buka
6e3f5dd44f [asan] Enable new stack poisoning with store instruction by default
Reviewers: eugenis

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D23968

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279993 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-29 19:28:34 +00:00
Vitaly Buka
b8ae70f140 Use store operation to poison allocas for lifetime analysis.
Summary:
Calling __asan_poison_stack_memory and __asan_unpoison_stack_memory for small
variables is too expensive.

Code is disabled by default and can be enabled by -asan-experimental-poisoning.

PR27453

Reviewers: eugenis

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D23947

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279984 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-29 18:17:21 +00:00
Vitaly Buka
49a5f5ed32 [asan] Minimize code size by using __asan_set_shadow_* for large blocks
Summary:
We can insert function call instead of multiple store operation.
Current default is blocks larger than 64 bytes.
Changes are hidden behind -asan-experimental-poisoning flag.

PR27453

Differential Revision: https://reviews.llvm.org/D23711

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279383 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-20 20:23:50 +00:00
Vitaly Buka
d66cc578a7 [asan] Initialize __asan_set_shadow_* callbacks
Summary:
Callbacks are not being used yet.

PR27453

Reviewers: kcc, eugenis

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D23634

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279380 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-20 18:34:39 +00:00
Vitaly Buka
7b2eb8e4d0 [asan] Optimize store size in FunctionStackPoisoner::poisonRedZones
Summary: Reduce store size to avoid leading and trailing zeros.

Reviewers: kcc, eugenis

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D23648

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279379 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-20 18:34:36 +00:00
Vitaly Buka
c662b7eae3 [asan] Cleanup instrumentation of dynamic allocas
Summary:
Extract instrumenting dynamic allocas into separate method.
Rename asan-instrument-allocas -> asan-instrument-dynamic-allocas

Differential Revision: https://reviews.llvm.org/D23707

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279376 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-20 17:22:27 +00:00
Vitaly Buka
31c625e355 Revert "[asan] Optimize store size in FunctionStackPoisoner::poisonRedZones"
This reverts commit r279178.

Speculative revert in hope to fix asan crash on arm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279277 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-19 17:15:38 +00:00
Vitaly Buka
588e241acb Revert "[asan] Fix size of shadow incorrectly calculated in r279178"
This reverts commit r279222.

Speculative revert in hope to fix asan crash on arm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279276 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-19 17:15:33 +00:00
Vitaly Buka
bc8fdf73ab [asan] Fix size of shadow incorrectly calculated in r279178
Summary: r279178 generates 8 times more stores than necessary.

Reviewers: eugenis

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D23708

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279222 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-19 08:33:53 +00:00
Vitaly Buka
0c6c3b22db [asan] Optimize store size in FunctionStackPoisoner::poisonRedZones
Summary: Reduce store size to avoid leading and trailing zeros.

Reviewers: kcc, eugenis

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D23648

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279178 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-18 23:51:15 +00:00
Vitaly Buka
3f7f855997 [asan] Extend test
Summary: PR27453

Reviewers: eugenis

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D23647

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279109 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-18 18:17:19 +00:00
Kostya Serebryany
aa4e23e1bb [sanitizer-coverage/libFuzzer] instrument comparisons with __sanitizer_cov_trace_cmp[1248] instead of __sanitizer_cov_trace_cmp, don't pass the comparison type to save a bit performance. Use these new callbacks in libFuzzer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279027 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-18 01:25:28 +00:00
Vitaly Buka
fc819213c1 [Asan] Unpoison red zones even if use-after-scope was disabled with runtime flag
Summary: PR27453

Reviewers: eugenis

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D23481

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278818 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16 16:24:10 +00:00
Vitaly Buka
ecefac9053 Unpoison stack before resume instruction
Summary:
Clang inserts cleanup code before resume similar way as before return instruction.
This makes asan poison local variables causing false use-after-scope reports.

__asan_handle_no_return does not help here as it was executed before
llvm.lifetime.end inserted into resume block.

To avoid false report we need to unpoison stack for resume same way as for return.

PR27453

Reviewers: kcc, eugenis

Differential Revision: https://reviews.llvm.org/D22661

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276480 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 22:04:38 +00:00
Vitaly Buka
cb5c574105 Fix detection of stack-use-after scope for char arrays.
Summary:
Clang inserts GetElementPtrInst so findAllocaForValue was not
able to find allocas.

PR27453

Reviewers: kcc, eugenis

Differential Revision: https://reviews.llvm.org/D22657

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276374 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 00:56:17 +00:00
Vedant Kumar
ea47fc5fc9 [tsan] Don't instrument __llvm_gcov_global_state_pred or __llvm_gcda*
r274801 did not go far enough to allow gcov+tsan to cooperate. With this
commit it's possible to run the following code without false positives:

  std::thread T1(fib), T2(fib);
  T1.join(); T2.join();

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276015 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-19 20:16:08 +00:00
Kostya Serebryany
ec8a2f2059 [sanitizer-coverage] make sure that calls to __sanitizer_cov_trace_pc are not merged (otherwise different calls get the same PC and confuse fuzzers)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275449 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-14 17:59:01 +00:00