Kostya Serebryany
2076af0184
[tsan] compile-time instrumentation: do not instrument a read if
...
a write to the same temp follows in the same BB.
Also add stats printing.
On Spec CPU2006 this optimization saves roughly 4% of instrumented reads
(which is 3% of all instrumented accesses):
Writes : 161216
Reads : 446458
Reads-before-write: 18295
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154418 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-10 18:18:56 +00:00
Kostya Serebryany
52eb699220
[tsan] treat vtable pointer updates in a special way (requires tbaa); fix a bug (forgot to return true after instrumenting); make sure the tsan tests are run
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153448 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-26 17:35:03 +00:00
Kostya Serebryany
1778513fa5
[asan] move x86-specific test to a separate X86 directory with a custom lit.local.cfg file
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152567 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-12 18:49:11 +00:00
Eli Bendersky
0f0c411079
Replace all instances of dg.exp file with lit.local.cfg, since all tests are run with LIT now and now Dejagnu. dg.exp is no longer needed.
...
Patch reviewed by Daniel Dunbar. It will be followed by additional cleanup patches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150664 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-16 06:28:33 +00:00
Kostya Serebryany
747c02c768
[asan] fix asan-vs-gvn.ll test (it did not actually check much before this change)
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150441 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-14 00:02:35 +00:00
Kostya Serebryany
60ebb1947f
ThreadSanitizer, a race detector. First LLVM commit.
...
Clang patch (flags) will follow shortly.
The run-time library will also follow, but not immediately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150423 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-13 22:50:51 +00:00
Kostya Serebryany
95e3cf44a9
[asan] unpoison the stack before every noreturn call. Fixes asan issue 37. llvm part
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150102 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-08 21:36:17 +00:00
Kostya Serebryany
0ca032b03d
The patch resolves the conflict between AddressSanitizer and load widening (GVN).
...
The problem initially reported by Mozilla folks (http://code.google.com/p/address-sanitizer/issues/detail?id=20 ),
but it also prevents us from enabling LLVM bootstrap with AddressSanitizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149925 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-06 22:48:56 +00:00
Kostya Serebryany
0307b9a885
[asan] enable asan only for the functions that have Attribute::AddressSafety
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148846 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-24 19:34:43 +00:00
Kostya Serebryany
091523c648
[asan] one more test for asan instrumentation: (*a)++ should be instrumented only once.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147509 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-04 01:02:14 +00:00
Kostya Serebryany
478a4d997a
[asan] add a test for instrumenting globals
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146718 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-16 01:28:19 +00:00
Kostya Serebryany
d2703dec27
[asan] do not instrument threadlocal globals, this is buggy
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145092 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-23 02:10:54 +00:00
Kostya Serebryany
5a3a9c9371
[asan] workaround for reg alloc bug 11395: don't instrument functions with large chunks of inline assembler
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144962 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-18 01:41:06 +00:00
Kostya Serebryany
7cf2a04361
fall back to explicit list of allowed linkages when instrumenting globals in asan; add a test check that asan does not touch linkonce_odr
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144933 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-17 23:14:59 +00:00
Kostya Serebryany
800e03f598
AddressSanitizer, first commit (compiler module only)
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144758 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-16 01:35:23 +00:00