summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2015-02-11[UBSan] Add report deduplication for -fsanitize=function.Alexey Samsonov
Summary: Make sure we don't print the error report from -fsanitize=function twice for the same source location, as we do in another UBSan handlers. Test Plan: check-ubsan test suite Reviewers: rsmith, pcc Reviewed By: pcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7524 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@228772 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-10[ASan/Win] Add the executable's directory to the symbol search pathTimur Iskhodzhanov
This should fix symbolization in those cases when the .exe file is moved together with the .pdb git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@228701 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-10[ASan] Add missing RUN: prefix.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@228651 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-09[ASan/Win] Add a test case for PR22431Timur Iskhodzhanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@228573 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-06[compiler-rt] Make MaybeReexec properly process DYLD_INSERT_LIBRARIES when ↵Kuba Brecka
using non-absolute paths MaybeReexec() in asan_mac.cc checks for presence of the ASan dylib in DYLD_INSERT_LIBRARIES, and if it is there, it will process this env. var. and remove the dylib from its value, so that spawned children don't have this variable set. However, the current implementation only works when using a canonical absolute path to the dylib, it fails to remove the dylib for example when using @executable_path. This patch changes the processing of DYLD_INSERT_LIBRARIES to comparing values only based on filenames (ignoring directories). Reviewed at http://reviews.llvm.org/D7160 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@228392 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-05[ASan] Fix interface_symbols_darwin.c testAlexander Potapenko
by manually adding __asan_mz_* to the generated interface functions list. Declaring these functions in asan_interface_internal.h doesn't work quite well: their prototypes must match the prototypes of zone functions in malloc/malloc.h, but some of the types (e.g. malloc_zone_t and size_t) aren't available in asan_interface_internal.h git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@228290 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-03[sanitizer] move the coverage interface into a separate header, ↵Kostya Serebryany
<sanitizer/coverage_interface.h>. NFC, except for the header name change. This may break existing users, but in this case it's better this way (not too many users so far) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@228017 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-03[ASan] Run tests with both static and dynamic runtime on Windows by default.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@228001 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-02[TSan] Add Go runtime sanity check to CMake build.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@227852 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-02[ASan/Win] Add a test case for r208215 [stack buffer overflow in <iostream>]Timur Iskhodzhanov
The issue re-appears if one uses the -fsanitize-blacklist= flag, so it's time to have a test case. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@227799 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-29[asan] use getrusage as an alternative to reading /proc/self/statm. Also ↵Kostya Serebryany
move GetRSS to sanitizer_linux_libcdep.cc (no change in the function itself) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@227416 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-29[ASan] Generalize/simplify lit test configs generation.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@227413 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-28[sanitizer] allow to reset the bb/edge coverage data inside the process ↵Kostya Serebryany
while it is running (single-threaded). Also expose the current coverage set to the process. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@227387 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27[ASan] Fix test cases: don't assume that fast unwinder can't unwind through ↵Alexey Samsonov
libc. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@227265 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27tsan: properly instrument unaligned accessesDmitry Vyukov
If a memory access is unaligned, emit __tsan_unaligned_read/write callbacks instead of __tsan_read/write. Required to change semantics of __tsan_unaligned_read/write to not do the user memory. But since they were unused (other than through __sanitizer_unaligned_load/store) this is fine. Fixes long standing issue 17: https://code.google.com/p/thread-sanitizer/issues/detail?id=17 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@227230 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27tsan: add test for ANNOTATE_HAPPENS_BEFORE/AFTER annotationsDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@227190 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27[ASan] Use rpath in tests that produce a shared libraryKuba Brecka
Modifying Darwin/interception-in-shared-lib-test.cc and suppressions-library.cc to use rpath instead of linking against the full path to the temporary file. NFC. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@227161 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-25Fix up test cases to account for improved column fidelity provided by clangDavid Blaikie
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@227033 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-23[compiler-rt] Ensure AsanInitFromRtl is called from a static initializer on ↵Kuba Brecka
OS X by using ASAN_DYNAMIC=1 The idea is to ensure that the ASan runtime gets initialized early (i.e. before other initializers/constructors) even when DYLD_INSERT_LIBRARIES is not used. In that case, the interceptors are not installed (on OS X, DYLD_INSERT_LIBRARIES is required for interceptors to work), and therefore ASan gets currently initialized quite late -- from the main executable's module initializer. The following issues are a consequence of this: https://code.google.com/p/address-sanitizer/issues/detail?id=363 https://code.google.com/p/address-sanitizer/issues/detail?id=357 Both of them are fixed with this patch. Reviewed at http://reviews.llvm.org/D7117 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226929 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-22Fix/workaround for OS X truncated stacktraces taken by external toolsKuba Brecka
This patch is a proposed solution for https://code.google.com/p/address-sanitizer/issues/detail?id=375: When the stacktraces are captured and printed by ASan itself, they are fine, but when the program has already printed the report (or is just printing it), capturing a stacktrace via other means is broken. "Other means" include OS X CrashReporter, debuggers or calling backtrace() within the program. For example calling backtrace() from a sanitizer_set_death_callback function prints a very truncated stacktrace. Reviewed at http://reviews.llvm.org/D7103 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226878 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-22[sanitizer] Move sched_getparam test under Linux/.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226832 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-22[sanitizer] Intercept sched_getparam.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226827 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-22[msan] Better use-after-free reports.Evgeniy Stepanov
By attaching an extra integer tag to heap origins, we are able to distinguish between uninits - created by heap allocation, - created by heap deallocation (i.e. use-after-free), - created by __msan_allocated_memory call, - etc. See https://code.google.com/p/memory-sanitizer/issues/detail?id=35. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226821 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-22[ASan/Win] Move the shadow to 0x30000000Timur Iskhodzhanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226809 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-22[ASan] Print out the shadow memory range on shadow mapping failuresTimur Iskhodzhanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226807 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-22[msan] Relax CHECK conditions in 2 tests.Evgeniy Stepanov
Sometimes malloc/realloc/etc are symbolized as __interceptor_malloc/realloc/etc. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226803 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-21[msan] Fix origins in realloc.Evgeniy Stepanov
Fixes 2 issues in origins arising from realloc() calls: * In the in-place grow case origin for the new memory is not set at all. * In the copy-realloc case __msan_memcpy is used, which unwinds stack from inside the MSan runtime. This does not generally work (as we may be built w/o frame pointers), and produces "bad" stack trace anyway, with several uninteresting (internal) frames on top. This change also makes realloc() honor "zeroise" and "poison_in_malloc" flags. See https://code.google.com/p/memory-sanitizer/issues/detail?id=73. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226674 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-21tsan: remove sleeps from testsDmitry Vyukov
Even sleep(1) lead to episodical flakes on some machines. Use an invisible by tsan barrier to enforce required execution order instead. This makes the tests deterministic and faster. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226659 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-21[msan] Update origin for the entire destination range on memory store.Evgeniy Stepanov
Previously we always stored 4 bytes of origin at the destination address even for 8-byte (and longer) stores. This should fix rare missing, or incorrect, origin stacks in MSan reports. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226658 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-21[ASan] Fix the test expectations for dyld_insert_libraries_reexec.cc Alexander Potapenko
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226651 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-21[asan] use MADV_NOHUGEPAGE for shadow to reduce the actual memory usageKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226636 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-20[asan] Allow changing verbosity in activation flags.Evgeniy Stepanov
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
2015-01-20[asan] Warn if unsupported flags are used at activation.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226563 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-19[sanitizer] Make unrecognized flags not fatal.Evgeniy Stepanov
Print a warning at verbosity=1 and higher instead of dying immediately. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226458 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-19[sanitizer] Move options-related tests to sanitizer_common.Evgeniy Stepanov
And handle help=1 in standalone LSan. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226438 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-18Update for tests failing due to improvements in clang's column information ↵David Blaikie
for aggregate expressions git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226393 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-16[asan] More verbose output from one of the tests.Evgeniy Stepanov
Trying to debug a buildbot-only failure. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226270 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-16[asan] Fix asan_options-include test.Evgeniy Stepanov
Wrong include order. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226268 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-15[asan] Loosen test for upcoming ppc64 changeHal Finkel
This test casts 0x4 to a function pointer and calls it. Unfortunately, the faulting address may not exactly be 0x4 on PPC64 ELFv1 systems. The LLVM PPC backend used to always generate the loads "in order", so we'd fault at 0x4 anyway. However, at upcoming change to loosen that ordering, and we'll pick a different order on some targets. As a result, as explained in the comment, we need to allow for certain nearby addresses as well. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226202 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-15[sanitizer] Implement include= option.Evgeniy Stepanov
Allows loading sanitizer options from file. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226175 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-15[sanitizer] Flag parser rewrite.Evgeniy Stepanov
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
2015-01-15[lsan] Fix a typo in a test.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226168 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-14Reapply debug info changes now that more precise column information is ↵David Blaikie
available. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225959 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-14Another try at handling LD_LIBRARY_PATH not being defined.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225932 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-14Handle LD_LIBRARY_PATH not being defined.Rafael Espindola
Should fix the bots after r225890. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225919 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-12Update test cases for new -fsanitize-recover= semantics.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225725 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-12[ASan] Move the shadow on Windows 32-bit from 0x20000000 to 0x40000000Timur Iskhodzhanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225641 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-12[asan] Pass activation options in the android test runner.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225636 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-12[ASan] Handle SIGBUS on Linux.Jay Foad
Summary: On Linux in some situations we can get SIGBUS instead of SIGSEGV on stack overflow, so asan should handle SIGBUS as well as SIGSEGV. https://code.google.com/p/address-sanitizer/issues/detail?id=369 Reviewers: samsonov, glider Reviewed By: glider Subscribers: glider, llvm-commits Differential Revision: http://reviews.llvm.org/D6923 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225630 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-09Revert "Reapply debug info changes now that more precise column information ↵David Blaikie
is available." While the clang patch is reverted pending investigation/fixes. This reverts commit r225001. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@225560 91177308-0d34-0410-b5e6-96231b3b80d8