summaryrefslogtreecommitdiff
path: root/test/Instrumentation
Commit message (Collapse)AuthorAge
...
* [msan] Update tests (broken in r168873).Evgeniy Stepanov2012-11-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168874 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial commit of MemorySanitizer.Evgeniy Stepanov2012-11-29
| | | | | | | Compiler pass only. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168866 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] when checking the noreturn attribute on the call, also check it on ↵Kostya Serebryany2012-11-29
| | | | | | the callee git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168861 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Split AddressSanitizer into two passes (FunctionPass, ModulePass), ↵Kostya Serebryany2012-11-28
| | | | | | LLVM part. This requires a clang part which will follow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168781 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: instrument atomic nand operationDmitry Vyukov2012-11-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168684 91177308-0d34-0410-b5e6-96231b3b80d8
* [tsan] add fail order to compare_exchangeDmitry Vyukov2012-11-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168586 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] don't instrument linker-initialized globals even with external ↵Kostya Serebryany2012-11-20
| | | | | | linkage in -asan-initialization-order mode git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168367 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] make sure that linker-initialized globals (non-extern) are not ↵Kostya Serebryany2012-11-20
| | | | | | instrumented even in -asan-initialization-order mode. This time with a test git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168366 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: switch to new memory_order constants (ABI compatible)Dmitry Vyukov2012-11-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167615 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: instrument all atomics (including fetch_add, exchange, cas, etc)Dmitry Vyukov2012-11-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167612 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] don't instrument globals that we've created ourselves (reduces the ↵Kostya Serebryany2012-11-01
| | | | | | binary size a bit) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167230 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] make sure asan erases old unused allocas after it created a new one. ↵Kostya Serebryany2012-10-19
| | | | | | This became important after the recent move from ModulePass to FunctionPass because no cleanup is happening after asan pass any more. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166267 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] fix a testKostya Serebryany2012-10-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165938 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: update the test for new atomic enumsDmitry Vyukov2012-10-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165109 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: update the test for new atomic enumsDmitry Vyukov2012-10-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165108 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. ↵Sylvestre Ledru2012-09-27
| | | | | | See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164767 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164768 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo 'iff' => 'if'Sylvestre Ledru2012-09-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164767 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] add code to detect global initialization fiasco in C/C++. The ↵Kostya Serebryany2012-08-21
| | | | | | sub-pass is off by default for now. Patch by Reid Watson. Note: this patch changes the interface between LLVM and compiler-rt parts of asan. The corresponding patch to compiler-rt will follow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162268 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] insert crash basic blocks inline as opposed to inserting them at the ↵Kostya Serebryany2012-08-14
| | | | | | end of the function. This doesn't seem to fix or break anything, but is considered to be more friendly to downstream passes (test change) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161871 91177308-0d34-0410-b5e6-96231b3b80d8
* revert r160742: it's breaking CMake buildNuno Lopes2012-07-25
| | | | | | | original commit msg: MemoryBuiltins: add support to determine the size of strdup'ed non-constant strings git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160751 91177308-0d34-0410-b5e6-96231b3b80d8
* MemoryBuiltins: add support to determine the size of strdup'ed non-constant ↵Nuno Lopes2012-07-25
| | | | | | strings git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160742 91177308-0d34-0410-b5e6-96231b3b80d8
* baby steps toward fixing some problems with inbound GEPs that overflow, as ↵Nuno Lopes2012-07-20
| | | | | | | | discussed 2 months ago or so. Make sure we do not emit index computations with NSW flags so that we dont get an undef value if the GEP overflows git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160589 91177308-0d34-0410-b5e6-96231b3b80d8
* move the bounds checking pass to the instrumentation folder, where it ↵Nuno Lopes2012-07-20
| | | | | | | | belongs. I dunno why in the world I dropped it in the Scalar folder in the first place. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160587 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] make sure that the crash callbacks do not get merged (Chandler's ↵Kostya Serebryany2012-07-20
| | | | | | idea: insert an empty InlineAsm). Change the order in which the new BBs are inserted: the slow path BB is insert between old BBs, the crash BB is inserted at the end. Don't create an empty BB (introduced by recent commits). Update the test. The experimental code that does manual crash callback merge will most likely be deleted later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160544 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] refactor instrumentation to allow merging the crash callbacks (not ↵Kostya Serebryany2012-07-16
| | | | | | fully implemented yet, no functionality change except the BB order) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160284 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r160254 temporarily.Chandler Carruth2012-07-16
| | | | | | | | | | | | It turns out that ASan relied on the at-the-end block insertion order to (purely by happenstance) disable some LLVM optimizations, which in turn start firing when the ordering is made more "normal". These optimizations in turn merge many of the instrumentation reporting calls which breaks the return address based error reporting in ASan. We're looking at several different options for fixing this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160256 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach AddressSanitizer to create basic blocks in a more natural order.Chandler Carruth2012-07-16
| | | | | | | | | This is particularly useful to the backend code generators which try to process things in the incoming function order. Also, cleanup some uses of IRBuilder to be a bit simpler and more clear. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160254 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a basic test for AddressSanitizer. This is just a bare-bonesChandler Carruth2012-07-16
| | | | | | | | | | | functionality test. In general, unless the functionality is substantially separated, we should lump more basic testing into this file. The test running infrastructure likes having a few test files with more comprehensive testing within them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160253 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] instrument cmpxchg and atomicrmwKostya Serebryany2012-05-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157683 91177308-0d34-0410-b5e6-96231b3b80d8
* [tsan] Atomic support for ThreadSanitizer, patch by Dmitry VyukovKostya Serebryany2012-04-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155698 91177308-0d34-0410-b5e6-96231b3b80d8
* [tsan] two more compile-time optimizations:Kostya Serebryany2012-04-10
| | | | | | | | | | | | | | | | - don't isntrument reads from constant globals. Saves ~1.5% of instrumented instructions on CPU2006 (counting static instructions, not their execution). - don't insrument reads from vtable (which is a global constant too). Saves ~5%. I did not measure the run-time impact of this, but it is certainly non-negative. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154444 91177308-0d34-0410-b5e6-96231b3b80d8
* [tsan] compile-time instrumentation: do not instrument a read ifKostya Serebryany2012-04-10
| | | | | | | | | | | | | | | 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
* [tsan] treat vtable pointer updates in a special way (requires tbaa); fix a ↵Kostya Serebryany2012-03-26
| | | | | | 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
* [asan] move x86-specific test to a separate X86 directory with a custom ↵Kostya Serebryany2012-03-12
| | | | | | lit.local.cfg file git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152567 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace all instances of dg.exp file with lit.local.cfg, since all tests are ↵Eli Bendersky2012-02-16
| | | | | | | | | | | 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
* [asan] fix asan-vs-gvn.ll test (it did not actually check much before this ↵Kostya Serebryany2012-02-14
| | | | | | change) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150441 91177308-0d34-0410-b5e6-96231b3b80d8
* ThreadSanitizer, a race detector. First LLVM commit.Kostya Serebryany2012-02-13
| | | | | | | | 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
* [asan] unpoison the stack before every noreturn call. Fixes asan issue 37. ↵Kostya Serebryany2012-02-08
| | | | | | llvm part git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150102 91177308-0d34-0410-b5e6-96231b3b80d8
* The patch resolves the conflict between AddressSanitizer and load widening ↵Kostya Serebryany2012-02-06
| | | | | | | | | | (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
* [asan] enable asan only for the functions that have Attribute::AddressSafetyKostya Serebryany2012-01-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148846 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] one more test for asan instrumentation: (*a)++ should be instrumented ↵Kostya Serebryany2012-01-04
| | | | | | only once. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147509 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] add a test for instrumenting globalsKostya Serebryany2011-12-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146718 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] do not instrument threadlocal globals, this is buggyKostya Serebryany2011-11-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145092 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] workaround for reg alloc bug 11395: don't instrument functions with ↵Kostya Serebryany2011-11-18
| | | | | | large chunks of inline assembler git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144962 91177308-0d34-0410-b5e6-96231b3b80d8
* fall back to explicit list of allowed linkages when instrumenting globals in ↵Kostya Serebryany2011-11-17
| | | | | | 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
* AddressSanitizer, first commit (compiler module only)Kostya Serebryany2011-11-16
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144758 91177308-0d34-0410-b5e6-96231b3b80d8