Commit Graph

332 Commits

Author SHA1 Message Date
Evgeniy Stepanov ca9e045570 [sanitizer] Fix off-by-8x in direct coverage.
File mapping offset was calculated by offsetting (uptr *) instead of (char *).

llvm-svn: 224821
2014-12-24 13:57:11 +00:00
Evgeniy Stepanov 0b7c1cf1e0 [asan] Disable one test on Android.
It used to pass by chance and started failing on recent Android builds.

llvm-svn: 224818
2014-12-24 12:23:15 +00:00
Jay Foad 4195dff0fb [ASan] Fix asan_preload_test-2 on PowerPC64 Linux
Summary:
This test failed because clang compiled the call to memset() into a
single sth instruction, instead of a call. Fix it by using write() instead
of memset().

Reviewers: kcc, samsonov, garious, eugenis

Reviewed By: eugenis

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6776

llvm-svn: 224812
2014-12-24 11:48:40 +00:00
Kostya Serebryany 9fdeb37bd3 [asan] change the coverage collection scheme so that we can easily emit coverage for the entire process as a single bit set, and if coverage_bitset=1 actually emit that bitset
llvm-svn: 224789
2014-12-23 22:32:17 +00:00
Kuba Brecka 2ce8c25f4b log-path_test testcase - make the invalid path more invalid
The ASan test/asan/TestCases/log-path_test.cc testcase uses /INVALID as an invalid path and expects that the program will not be allowed to create or write to that file. This actually is a valid writable path on one of my setups. Let's make the path more invalid.

Reviewed at http://reviews.llvm.org/D6727

llvm-svn: 224694
2014-12-22 00:02:28 +00:00
Evgeniy Stepanov b01eee941d [asan] Test BB- and edge- level coverage on Android.
llvm-svn: 224572
2014-12-19 12:21:40 +00:00
Evgeniy Stepanov aa7daaef7e [asan] Add tests for direct (mmap-ed) mode for BB- and edge-level coverage.
llvm-svn: 224571
2014-12-19 11:49:46 +00:00
Evgeniy Stepanov fd454ec3d9 [asan] Resurrect sanitize-coverage test on Android.
The test got silently disabled because of a typo in the lit config.
Also, compiler flags have changed (asan-coverage -> fsanitize-coverage).

llvm-svn: 224569
2014-12-19 10:40:14 +00:00
Filipe Cabecinhas 9fd326d4d6 Fix suppressions file usage
Summary:
Always quote suppressions files given to *_OPTIONS.
This will make it not break when given full Windows paths (otherwise,
parsing would stop after the drive's letter + ':').

Also fix one or two cases where the suppression files' extensions were
not *.supp.

Reviewers: samsonov, kcc

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6680

llvm-svn: 224529
2014-12-18 18:25:18 +00:00
Alexey Samsonov ae23ffb751 [ASan] Mark test for -fsized-delete as XFAIL for dynamic runtime.
-fsized-delete is implemented via weak symbols, and doesn't work
properly when malloc/free replacements are provided in shared
ASan runtime.

llvm-svn: 224474
2014-12-17 23:46:53 +00:00
Alexey Samsonov 658e2d274d [ASan] Add -ldl to linker invocation to lit tests that require it.
This fixes these tests under dynamic ASan runtime.

llvm-svn: 224473
2014-12-17 23:46:49 +00:00
Alexey Samsonov 969902b43b [ASan] Always build shared ASan runtime on Linux.
This commit changes the strategy for building shared ASan runtime
and the way we test it:
  - COMPILER_RT_BUILD_SHARED_ASAN CMake option is removed. We now
    always build shared ASan runtime (it is the default on Android,
    Windows and Mac, and not the default on Linux and FreeBSD).
  - Platforms, which use static runtime by default now have
    "check-asan-dynamic" testsuite. This testsuite contains instrumented
    unit tests, and ASan lit tests, and runs them with shared ASan
    runtime. This testsuite is *not* a part of "check-asan" and
    *not* a part of "check-all", as adding 1000 more test cases, which
    duplicate existing ones is costly. However, you're welcome to
    add this command to your buildbot.

llvm-svn: 224470
2014-12-17 23:14:01 +00:00
Viktor Kutuzov 7163d00359 [Asan] XFAIL the interception_failure_test.cc test on FreeBSD
Differential Revision: http://reviews.llvm.org/D6591

llvm-svn: 224117
2014-12-12 12:13:40 +00:00
Viktor Kutuzov df4dab69e2 [Asan] Fix the tsd_dtor_leak.cc test to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D6590

llvm-svn: 224116
2014-12-12 12:09:56 +00:00
Timur Iskhodzhanov 92292898ab Fix check-asan on Windows by putting lib/clang/... onto PATH (PR21880)
llvm-svn: 224018
2014-12-11 14:04:57 +00:00
Timur Iskhodzhanov 924a4921b4 Update ASan/Win test expectations broken by r223508
llvm-svn: 223932
2014-12-10 17:56:29 +00:00
Kuba Brecka ddac6cbb34 XFAILing suppression tests on Android. The suppression files are not being transfered to the device.
llvm-svn: 223540
2014-12-05 22:47:44 +00:00
Kuba Brecka b79ccbeb71 Recommit of r223513 and r223514.
Reviewed at http://reviews.llvm.org/D6488

llvm-svn: 223533
2014-12-05 22:19:35 +00:00
Kuba Brecka cd9e81a363 Reverting r223513 and r223514.
llvm-svn: 223519
2014-12-05 21:32:22 +00:00
Kuba Brecka 423f3a0bc0 AddressSanitizer - Don't instrument globals from cstring_literals sections. (compiler-rt part)
Reviewed at http://reviews.llvm.org/D6488

llvm-svn: 223514
2014-12-05 21:05:04 +00:00
Kuba Brecka dde00302c7 Implement AddressSanitizer suppressions.
Adds 3 new suppression types, "interceptor_name", "interceptor_via_fun", "interceptor_via_lib".

Reviewed at http://reviews.llvm.org/D6280.

llvm-svn: 223508
2014-12-05 20:26:09 +00:00
Kostya Serebryany c93c84e882 [asan] fix four asan tests to run in use-after-return mode
llvm-svn: 223181
2014-12-03 00:08:41 +00:00
Evgeniy Stepanov b52e3aba3f [asan] Disable preload tests on Android.
They don't test what they claim to because LD_PRELOAD applies to "not" instead
of the actual test binary. And all Android tests run with LD_PRELOAD anyway.

llvm-svn: 222835
2014-11-26 15:44:15 +00:00
Viktor Kutuzov fb61eae0e4 [Asan] Fix the heavy_uar_test.cc test to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D6406

llvm-svn: 222826
2014-11-26 11:38:45 +00:00
Alexey Samsonov 9f8d091ea9 [ASan] Fix typo in test
llvm-svn: 222800
2014-11-26 00:23:51 +00:00
Jay Foad 0160570a0f [ASan] Fix leak tests on 64-bit targets other than x86-64 (take two)
Summary:
First, remove lit configuration that sets ASAN_OPTIONS to detect_leaks=1
because this is already the default when leak detection is supported.
This removes a bit of duplication between various lit.cfg files.

Second, add a new feature 'leak-detection' if we're targetting x86_64
(not i386) on Linux.

Third, change a couple of tests that need leak detection to require the
new 'leak-detection' feature.

Reviewers: kcc, earthdok, samsonov

Reviewed By: samsonov

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6396

llvm-svn: 222738
2014-11-25 07:56:04 +00:00
Renato Golin 94a272d479 Try to fix ARM buildbots
llvm-svn: 222619
2014-11-22 16:59:03 +00:00
Yury Gribov 30a990744b [asan] Runtime support for asan-instrument-allocas which enables instrumentation of variable-sized dynamic allocas. Patch by Max Ostapenko.
Reviewed at http://reviews.llvm.org/D6055

llvm-svn: 222520
2014-11-21 10:32:05 +00:00
Kuba Brecka b5b4dd81ba Move ASan non-Linux-specific tests out of the Linux/ directory
Reviewed at http://reviews.llvm.org/D6244

llvm-svn: 222486
2014-11-21 00:21:43 +00:00
Kuba Brecka 638bb4a2a3 Make the ASan OS X DYLD_INSERT_LIBRARIES detection path-independent
Reviewed at http://reviews.llvm.org/D6238

ASan on Darwin during launch reads DYLD_INSERT_LIBRARIES env. variable and if it's not set or if the ASan dylib is not present in there, it relaunches the process. The check whether the dylib is present in the variable is now trying to find a full path in there. This fails in the scenarios where we want to copy the dylib to the executable's directory or somewhere else and set the DYLD_INSERT_LIBRARIES manually, see http://reviews.llvm.org/D6018.

Let's change the search in DYLD_INSERT_LIBRARIES to only look for the filename of the dylib and not the full path.

llvm-svn: 222297
2014-11-19 01:31:59 +00:00
Kostya Serebryany c9d251e4d1 [asan] initial support for experimental basic-block tracing; also add tests for various levels of -fsanitize-coverage
llvm-svn: 222291
2014-11-19 00:24:11 +00:00
Evgeniy Stepanov e0a026f8ad [asan] Re-enable zero_page_pc test on Android.
It's not failing anymore. Not sure what has changed (the bot was down for a
long time), but lets keep it this way.

llvm-svn: 222236
2014-11-18 14:28:57 +00:00
Evgeniy Stepanov ca72ebb9ce [asan] Fix CMake CMP0046 warning in standalone build.
Make FileCheck an "imported dependency" in standalone build.

llvm-svn: 222234
2014-11-18 14:04:12 +00:00
Jay Foad 670bdb5a64 Revert r222091 because it caused a buildbot failure.
llvm-svn: 222095
2014-11-16 09:44:37 +00:00
Jay Foad 83c97c6997 [ASan] Fix leak tests on 64-bit targets other than x86-64
Summary:
This test explicitly sets ASAN_OPTIONS=detect_leaks=1 which is only
supported on x86-64. The test is currently restricted to run only on
64-bit targets, but needs to be restricted further so it only runs on
x86-64.

Reviewers: kcc, eugenis, earthdok, samsonov

Reviewed By: samsonov

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6189

llvm-svn: 222091
2014-11-15 23:00:14 +00:00
Kostya Serebryany 183cb6e35d [asan] add interface function __sanitizer_get_total_unique_coverage; useful for coverage-guided in-process fuzzers
llvm-svn: 222060
2014-11-14 23:15:55 +00:00
Jay Foad 66928be0af [ASan] Really fix zero_page_pc test for PowerPC
Summary:
As a follow-up to D6167, this patch fixes the test to account for
another difference between PowerPC and x86 systems.

On x86 if you branch to an invalid address, you get a SIGSEGV with PC
set to the invalid address (and si_addr in the siginfo struct also set
to the same address).

On PowerPC, you get a SIGSEGV with PC pointing at the branch
instruction, but si_addr set to the invalid address.

You can see this difference if you run the test case under gdb.

Reviewers: kcc, glider, samsonov

Reviewed By: samsonov

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6226

llvm-svn: 221929
2014-11-13 21:53:00 +00:00
Yury Gribov ecfa592671 Removed r221896, it seems to break build in various ways.
llvm-svn: 221912
2014-11-13 19:37:30 +00:00
Yury Gribov 17072ef348 [ASan] Add process basename to log name and error message to simplify analysis of sanitized systems logs.
Reviewed at http://reviews.llvm.org/D5724

llvm-svn: 221896
2014-11-13 16:01:23 +00:00
Jay Foad 347a2b7cd4 [ASan] Fix large allocator test case to cope with 64k pages
Summary: My PowerPC64 Linux box has 64k pages. The test assumes 4k pages. Fix it.

Reviewers: glider, eugenis, samsonov

Reviewed By: samsonov

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6228

llvm-svn: 221875
2014-11-13 09:15:15 +00:00
Timur Iskhodzhanov c80bd6974e Add a test for PR21528 to make sure ASan C++ symbolization doesn't regress
llvm-svn: 221814
2014-11-12 20:37:57 +00:00
Kostya Serebryany 2dd74371b2 [asan] [mips] added support of asan for mips64/mips64el, patch by Kumar Sukhani
llvm-svn: 221800
2014-11-12 18:23:16 +00:00
Jay Foad 9b70a919db [ASan] Skip dump_instruction_bytes test on non-x86 targets
Summary: This test case is blatantly x86-specific, so skip it on other targets.

Reviewers: kcc, eugenis, earthdok, samsonov

Reviewed By: samsonov

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6216

llvm-svn: 221778
2014-11-12 09:45:40 +00:00
Jay Foad 854655886b [ASan] Skip ptrace test on non-x86 targets
Summary:
Address sanitization of ptrace(2) is only implemented for x86, so skip
the test on other targets.

Reviewers: kcc, eugenis, earthdok, samsonov

Reviewed By: samsonov

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6215

llvm-svn: 221777
2014-11-12 09:42:01 +00:00
Kostya Serebryany 8278644dc8 [asan] fix coverage tests to use the new flag syntax (-fsanitize-coverage=N)
llvm-svn: 221720
2014-11-11 22:15:44 +00:00
Renato Golin 03603439e3 PPC fix works for ARM, too
llvm-svn: 221551
2014-11-07 21:55:11 +00:00
Jay Foad 46d5df53ab [ASan] Fix zero_page_pc test for PowerPC
Summary:
In the Power architecture, all branch instructions ignore the 2 least
significant bits of the target address. Consequently if you branch to an
invalid address, the address reported along with the SIGSEGV will have
been rounded down to a multiple of 4. Tweak this test accordingly.

This may fix the test for ARM too, in which case we could remove
the XFAIL, but I have no way of testing that.

Reviewers: kcc, willschm, glider, samsonov

Reviewed By: samsonov

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6167

llvm-svn: 221542
2014-11-07 20:42:11 +00:00
Will Schmidt ae4236ac6a Use GET_CURRENT_FRAME() to calculate the memory layout for power. This works
for both PPC64 Big and Little endian modes, so also eliminates the need for
the BIG_ENDIAN/LITTLE_ENDIAN #ifdeffery.

By trial and error, it also looks like the kPPC64_ShadowOffset64 value is
valid using (1ULL << 41) for both BE and LE, so that #if/#elif/#endif block
has also been simplified.

Differential Revision: http://reviews.llvm.org/D6044

llvm-svn: 221457
2014-11-06 14:58:06 +00:00
Kuba Brecka fe4e7c1716 Fix failing allow_user_segv.cc test on OS X 10.10
The current ASan testcase Posix/allow_user_segv.cc expects SIGBUS to be triggered on 32-bit Darwin. This has apparently changed on 10.10 to trigger SIGSEGV instead, just as on 64-bit. Let's just install handlers for both SIGSEGV and SIGBUS instead of #ifdef'ing.

Reviewed at http://reviews.llvm.org/D6121

llvm-svn: 221381
2014-11-05 18:58:41 +00:00
Kuba Brecka 6c22aec23c Use @rpath as LC_ID_DYLIB for ASan dylib on OS X
Change the LC_ID_DYLIB of ASan's dynamic libraries on OS X to be set to "@rpath/libclang_rt.asan_osx_dynamic.dylib" and similarly for iossim. Clang driver then sets the "-rpath" to be the real path to where clang currently has the dylib (because clang uses the relative path to its current executable). This means if you move the compiler or install the binary release, -fsanitize=address will link to the proper library.

Reviewed at http://reviews.llvm.org/D6018

llvm-svn: 221278
2014-11-04 17:34:50 +00:00
Kostya Serebryany b6eae0c2bc [asan] run-time part of the caller-callee coverage instrumentation
llvm-svn: 220975
2014-10-31 17:19:11 +00:00
Kostya Serebryany c9855da6d9 [asan] the run-time part of intra-object-overflow detector (-fsanitize-address-field-padding=1). Note that all of this is still experimental; don't use unless you are brave.
llvm-svn: 220013
2014-10-17 01:22:37 +00:00
Kostya Serebryany 87b70fc823 [asan] make sure coverage is dumped even if leaks are reported
llvm-svn: 219946
2014-10-16 18:59:07 +00:00
Renato Golin 498b223eec Re-enable ASAN/UBSAN tests on ARM, with VFP3 they began to pass
When compiling with -mfpu=vfpv3, those tests began to pass, like the others
with "Illegal Instruction" error, so removing the XFAIL from them should
get the bot green (and have more tests!).

llvm-svn: 219721
2014-10-14 21:00:22 +00:00
Petar Jovanovic a1ac4b2f6a [asan][mips] Adding support of asan for mipsel arch
cmake/config-ix.cmake: Enabled building of asan for mipsel arch
test/asan/CMakeLists.txt: Enabled testing of asan for mipsel

Patch by Kumar Sukhani

Differential Revision: http://reviews.llvm.org/D5615

llvm-svn: 219496
2014-10-10 13:46:55 +00:00
Renato Golin e68963a986 XFAIL some more sanitiser ARMv7l tests
Some more tests failing on the ARMv7 buildbot.

llvm-svn: 219404
2014-10-09 11:34:40 +00:00
Renato Golin 1aaa4bcdd1 Mark sanitizer tests XFAIL on ARMv7
ASAN, UBSAN and profile tests that don't work with arm-linux-gnueabi and
android also don't work on armv7l-linux-gnueabihf. Some of the tests have
known causes, others not yet. In order to get a green bot, I'm disabling
those tests for now and will investigate when the priority rises.

llvm-svn: 219343
2014-10-08 21:13:23 +00:00
Yuri Gorshenin d6c04770c1 Fixed asan-asm-stacktrace-test.cc
Summary: Fixed asan-asm-stacktrace-test.cc. Now it's supported on x86_64 and added test run when no debug info is generated.

Differential Revision: http://reviews.llvm.org/D5547

llvm-svn: 219200
2014-10-07 11:12:55 +00:00
Kostya Serebryany 36aa17a4e3 [asan] make new_array_cookie_test more robust
llvm-svn: 218841
2014-10-01 23:24:54 +00:00
Evgeniy Stepanov d90c20bc26 [asan] Scale back mmap_limit_mb test.
There is some strange interaction between mmap limit and unlimited stack
(ulimit -s unlimited), which results in this test failing when run with
"make".

llvm-svn: 218764
2014-10-01 14:21:05 +00:00
Evgeniy Stepanov 0f7ab59adc [sanitizer] Add i686 arch to compiler-rt.
This is needed so we can produce -i686- named libraries for
x86 Android (which is i686-linux-android).

An alternative solution would be keeping the "i386" name internally and
tweaking the OUTPUT_NAME of compiler-rt libraries.

llvm-svn: 218761
2014-10-01 12:55:06 +00:00
Evgeniy Stepanov b68af953d9 [asan] Tune down mmap_limit_mb test.
The memory limits were a bit too large for 32-bit Android.

llvm-svn: 218759
2014-10-01 12:43:50 +00:00
Evgeniy Stepanov a9d434918e [asan] XFAIL one test on Android.
And add a missing return in main, just in case.

llvm-svn: 218674
2014-09-30 12:54:32 +00:00
Evgeniy Stepanov 3b7a461674 [asan] Run tests with the default compiler on Android.
llvm-svn: 218664
2014-09-30 11:12:41 +00:00
Evgeniy Stepanov fa413a977d [asan] Re-enable lsan_annotations test on Android.
Was fixed by r218605.

llvm-svn: 218663
2014-09-30 11:11:59 +00:00
Kostya Serebryany da9d495d03 [asan] add a test for array cookie if the operator new is defined inside the class (the cookie should not be poisoned in such case); update the related comment in asan_poisoning.cc
llvm-svn: 218620
2014-09-29 19:40:56 +00:00
Evgeniy Stepanov 9e922e7d24 [sanitizer] Android build cleanup.
* Detect Android toolchain target arch and set correct runtime library name.
* Merged a lot of Android and non-Android code paths.
* Android is only supported in standalone build of compiler-rt now.
* Linking lsan-common in ASan-Android (makes lsan annotations work).
* Relying on -fsanitize=address linker flag when building tests (again,
  unification with non-Android path).
* Runtime library moved from lib/asan to lib/linux.

llvm-svn: 218605
2014-09-29 13:18:55 +00:00
Kuba Brecka 7e38e429b7 [compiler-rt] recommit of r218481: ASan debugging API for report info extraction and locating addresses
Reviewed at http://reviews.llvm.org/D4527

Fixed a test case failure on 32-bit Linux, I did right shift on intptr_t, instead it should have been uintptr_t.

llvm-svn: 218538
2014-09-26 19:15:32 +00:00
Kuba Brecka db22cd1721 [compiler-rt] revert r218481 due to test failure on sanitizer-x86_64-linux
llvm-svn: 218501
2014-09-26 05:25:37 +00:00
Kuba Brecka e892580415 [compiler-rt] fix failing debug_locate.cc test due to a leak
New test from r218481 fails on Linux due to LeakSanitizer reporting a leak, this patch frees the memory properly. 

llvm-svn: 218483
2014-09-26 00:20:37 +00:00
Kuba Brecka e37e089b66 [compiler-rt] ASan debugging API for report info extraction and locating addresses
Reviewed at http://reviews.llvm.org/D4527

This patch is part of an effort to implement a more generic debugging API, as proposed in http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-July/074656.html, with first part reviewed at http://reviews.llvm.org/D4466. Now adding several new APIs: __asan_report_present, __asan_get_report_{pc,bp,sp,address,type,size,description}, __asan_locate_address. These return whether an asan report happened yet, the PC, BP, SP, address, access type (read/write), access size and bug description (e.g. "heap-use-after-free"), __asan_locate_address takes a pointer and tries to locate it, i.e. say whether it is a heap pointer, a global or a stack, or whether it's a pointer into the shadow memory. If global or stack, tries to also return the variable name, address and size. If heap, tries to return the chunk address and size. Generally these should serve as an alternative to "asan_describe_address", which only returns all the data in text form. Having an API to get these data could allow having debugging scripts/extensions that could show additional information about a variable/expression/pointer. Test cases in test/asan/TestCases/debug_locate.cc and test/asan/TestCasea/debug_report.cc.

llvm-svn: 218481
2014-09-25 23:53:57 +00:00
Kostya Serebryany 8a86fa37af [asan] disable a test that uses -coverage on Android
llvm-svn: 218475
2014-09-25 23:30:37 +00:00
Kostya Serebryany 34ddf8725c [asan] don't instrument module CTORs that may be run before asan.module_ctor. This fixes asan running together -coverage
llvm-svn: 218421
2014-09-24 22:41:55 +00:00
Alexander Potapenko 1aba330e52 [ASan] Introduce the dump_instruction_bytes flag to print the faulting instruction upon SIGSEGV
When dump_instruction_bytes=1 and the instruction pointer doesn't point to the zero page, ASan prints 16 bytes starting at the instruction point.

llvm-svn: 218243
2014-09-22 11:58:52 +00:00
Viktor Kutuzov ea66f5bc40 Enable Asan lit tests on FreeBSD.
Differential Revision: http://reviews.llvm.org/D5375

llvm-svn: 218042
2014-09-18 10:04:07 +00:00
Viktor Kutuzov 308b93f6e4 Add FreeBSD support to the address sanitizer's deep_call_stack.cc test case
Differential Revision: http://reviews.llvm.org/D4562

llvm-svn: 217943
2014-09-17 07:31:37 +00:00
Evgeniy Stepanov 6ef0106e43 [asan] Fix a comment in a test.
llvm-svn: 217869
2014-09-16 12:01:01 +00:00
Evgeniy Stepanov a59459de27 [asan] Fix a flaky test.
This test has a chance to hit some other random allocation
and get neither heap overflow nor SEGV.

Relax test condition to only check that there is no internal CHECK failure.

llvm-svn: 217769
2014-09-15 13:05:40 +00:00
Evgeniy Stepanov 7a8330e7bf [asan] Fix path in test.
llvm-svn: 217754
2014-09-15 09:33:20 +00:00
Evgeniy Stepanov 207930d345 [asan] Disable wait4 test on Android.
https://code.google.com/p/memory-sanitizer/issues/detail?id=64

llvm-svn: 217753
2014-09-15 09:20:15 +00:00
Timur Iskhodzhanov 651725e191 [ASan/Win] Fix PR20918 -- SEH handler doesn't work with the MD runtime
llvm-svn: 217679
2014-09-12 14:01:30 +00:00
Yuri Gorshenin 6118d07b00 [asan-assembly-instrumentation] Added end-to-end test for proper stack unwind for functions with inline assembly.
Summary: [asan-assembly-instrumentation] Added end-to-end test for proper stack unwind for functions with inline assembly.

Reviewers: eugenis

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5260

llvm-svn: 217487
2014-09-10 10:44:35 +00:00
Alexey Samsonov 62063b46fc Use "-gline-tables-only" instead of "-g" in sanitizer test suites.
We are interested in verifying that -gline-tables-only provides enough
debug information for verbose error reports and symbolized stack traces.

llvm-svn: 217284
2014-09-05 22:05:32 +00:00
Alexander Potapenko 869342c1cb [ASan] disable zero_page_pc.cc on Android.
Bug: https://code.google.com/p/address-sanitizer/issues/detail?id=336

llvm-svn: 217228
2014-09-05 06:26:08 +00:00
Kostya Serebryany d147590492 [asan] trying to de-flake new_array_cookie_uaf_test.cc
llvm-svn: 217177
2014-09-04 18:02:59 +00:00
Alexander Potapenko 7c3d581e8a [ASan] Remove the check for a double-SEGV from zero_page_pc.cc
Looks like the second crash doesn't happen on Mac.

llvm-svn: 217165
2014-09-04 15:40:25 +00:00
Alexander Potapenko 9d24aa0fa8 [ASan] allow deadly signals to be received in signal handlers
(previously ASan would just crash upon the second SEGV)
Other tools do not use this code yet.

llvm-svn: 217137
2014-09-04 09:34:22 +00:00
Alexey Samsonov c8d8ca0bd6 Fix fast stack unwind on ARM to support code generated with GCC.
http://reviews.llvm.org/D4692

Patch by Maxim Ostapenko!

llvm-svn: 217079
2014-09-03 21:10:44 +00:00
Kostya Serebryany c148f7c3af [asan] enable poison_array_cookie back
llvm-svn: 216705
2014-08-29 01:16:18 +00:00
Kostya Serebryany ac77055272 [asan] introduce __asan_load_cxx_array_cookie: check that the array cookie address is properly poisoned and return the cookie value. If not, return 0 to avoid infinite loop of DTORs (in case of use-after-free). Calls to this function will be inserted by clang (separate change)
llvm-svn: 216692
2014-08-28 22:28:04 +00:00
Kostya Serebryany 1e3b338606 [asan] disable poison_array_cookie while I am investigating a false positive on chromium (I suspect that LLVM looses nosanitizer metadata; no test yet)
llvm-svn: 216684
2014-08-28 20:24:05 +00:00
Timur Iskhodzhanov f77d20b1a9 [ASan/Win] Add a test case for r216663 [-Zl vs LIBCMT vs asan_win_uar_thunk]
llvm-svn: 216665
2014-08-28 13:20:23 +00:00
Alexander Potapenko 53cce89a81 [UBSan] Temporarily disable checks for stack traces in UBSan reports on Darwin
to make the tests green.
Slow stack unwinding is disabled in libsanitizer on Darwin now.

llvm-svn: 216657
2014-08-28 09:25:06 +00:00
Evgeniy Stepanov 5d321d759d [asan] Add asprintf negative test.
llvm-svn: 216542
2014-08-27 12:46:58 +00:00
Kostya Serebryany 9455c5ab81 [asan] add a test for poison_array_cookie=1
llvm-svn: 216494
2014-08-26 22:05:12 +00:00
Timur Iskhodzhanov 81885731a8 [ASan/Win] Rename asan_dll_thunk.cc to asan_win_dll_thunk.cc
llvm-svn: 216448
2014-08-26 10:21:37 +00:00
Timur Iskhodzhanov 220ddacf8d [ASan/Win] Land the trivial bits of -MD RTL support (PR20214)
llvm-svn: 216265
2014-08-22 12:38:07 +00:00
Timur Iskhodzhanov 893beb96a2 [ASan/Win] Slightly update&relax test expectations to work with both -MT and -MD (in progress, PR20214) CRTs
llvm-svn: 215641
2014-08-14 13:11:39 +00:00
Timur Iskhodzhanov 7040f13639 [ASan/Win] Mark tests that require -MT asan_dll_thunk as such
llvm-svn: 215638
2014-08-14 13:02:51 +00:00
Alexey Samsonov b9ec65cd4d [Sanitizer] Kill deprecated allocator interfaces in ASan, MSan and TSan in favor of
a unified interface in <sanitizer/allocator_interface.h>.

llvm-svn: 215469
2014-08-12 20:28:20 +00:00