summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/asan/TestCases
Commit message (Collapse)AuthorAgeFilesLines
...
* Diable test suppressions-library for NetBSD/i386Kamil Rytarowski2018-10-311-0/+1
| | | | | | This is a part of the ASan test-suite. llvm-svn: 345707
* Mark breaking asan tests on NetBSDKamil Rytarowski2018-10-306-1/+9
| | | | | | | | | | | | Failing ones: - coverage-reset - coverage - dlclose-test - interception-in-shared-lib-test - stack-use-after-return - tsd_dtor_leak llvm-svn: 345663
* Mark interception_failure_test with XFAIL for NetBSDKamil Rytarowski2018-10-301-1/+1
| | | | | | This test breaks also on FreeBSD. llvm-svn: 345619
* Disable ASan test asan_and_llvm_coverage_test for NetBSDKamil Rytarowski2018-10-301-0/+3
| | | | | | Right now the LLVM profile feature is turned off for this OS. llvm-svn: 345600
* Adapt ASan test heavy_uar_test for NetBSDKamil Rytarowski2018-10-301-2/+2
| | | | | | | | The stack size is tight for the main thread in multithread environment and follow the FreeBSD approach of reducing stack usage. llvm-svn: 345599
* Mark intercept-rethrow-exception.cc as XFAIL on NetBSDKamil Rytarowski2018-10-091-0/+4
| | | | | | | This is an ASan test for functionality that has not been ported to NetBSD so far. llvm-svn: 344047
* Use PTHREAD_STACK_MIN conditionally in a testKamil Rytarowski2018-10-091-0/+2
| | | | | | | | PTHREAD_STACK_MIN is not available on NetBSD as it's not clear what the value shall be represented by this constant on a multiplatform OS. llvm-svn: 344034
* Revert r343606/r342652 "[winasan] Unpoison the stack in NtTerminateThread""Reid Kleckner2018-10-051-1/+0
| | | | | | This still seems to be causing pnacl + asan to crash. llvm-svn: 343876
* Reland r342652 "[winasan] Unpoison the stack in NtTerminateThread"David Major2018-10-021-0/+1
| | | | | | | | In long-running builds we've seen some ASan complaints during thread creation that we suspect are due to leftover poisoning from previous threads whose stacks occupied that memory. This patch adds a hook that unpoisons the stack just before the NtTerminateThread syscall. Differential Revision: https://reviews.llvm.org/D52091 llvm-svn: 343606
* Revert r342652 "[winasan] Unpoison the stack in NtTerminateThread"Hans Wennborg2018-09-281-1/+0
| | | | | | | | | | | | | This seems to cause the thread's exit code to be clobbered, breaking Chromium tests. Also revert follow-up r342654. > In long-running builds we've seen some ASan complaints during thread creation that we suspect are due to leftover poisoning from previous threads whose stacks occupied that memory. This patch adds a hook that unpoisons the stack just before the NtTerminateThread syscall. > > Differential Revision: https://reviews.llvm.org/D52091 llvm-svn: 343322
* [Coverage] Disable Linux/coverage-missing.cc in AddressSanitizer-i386-linux ↵Fangrui Song2018-09-271-1/+9
| | | | | | | | | | | | | | | testsuite sancov.py relies on objdump -d to obtain the number of instrumented PCs. The i386 %dynamiclib will now include .plt entries that are not recognized by objdump, "sancov.py: found 0 instrumented PCs in *.so", causing AddressSanitizer-i386-linux to fail. Change it back to x86-target-arch after %sancov switches to a more robust approach. llvm-svn: 343178
* Fix test after r342652David Major2018-09-201-0/+1
| | | | llvm-svn: 342654
* [asan] Fix test case failure on SystemZUlrich Weigand2018-09-141-0/+2
| | | | | | | | | Since we changed our inlining parameters, this test case was failing on SystemZ, as the two tests were now both inlined into the main function, which the test didn't expect. Fixed by adding a few more noinline attributes. llvm-svn: 342236
* [asan] Clean up some confusing code inDan Liew2018-09-031-4/+1
| | | | | | | | | | | | | | `test/asan/TestCases/Darwin/segv_read_write.c` * The `fd` arg passed to `mmap()` should be `-1`. It is not defined what passing `0` does on Darwin. * The comment about the shadow memory doesn't make any sense to me, so I'm removing it. Differential Revision: https://reviews.llvm.org/D44579 llvm-svn: 341307
* [CMake] Use normalized Windows target triplesPetr Hosek2018-08-0926-26/+26
| | | | | | | | | | | Changes the default Windows target triple returned by GetHostTriple.cmake from the old environment names (which we wanted to move away from) to newer, normalized ones. This also requires updating all tests to use the new systems names in constraints. Differential Revision: https://reviews.llvm.org/D47381 llvm-svn: 339307
* Test: Enable exceptions for test that needs itFilipe Cabecinhas2018-08-011-1/+1
| | | | llvm-svn: 338535
* [Asan][Msan] Unit tests Disable some tests for FreeBSDDavid Carlier2018-07-253-1/+8
| | | | | | | | | | Reviewers: krytarowski Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D49784 llvm-svn: 337913
* Rename __asan_gen_* symbols to ___asan_gen_*.Peter Collingbourne2018-07-182-7/+7
| | | | | | | | | | This prevents gold from printing a warning when trying to export these symbols via the asan dynamic list after ThinLTO promotes them from private symbols to external symbols with hidden visibility. Differential Revision: https://reviews.llvm.org/D49498 llvm-svn: 337428
* Limit ASan non-executable-pc test case to x86 botsVlad Tsyrklevich2018-07-101-10/+4
| | | | | | | | The test case fails on the big-endian PPC bot, probably because PowerPC uses function descriptors. More over other architectures don't support NX mappings. (This test case was not being exercised prior to r336633.) llvm-svn: 336714
* [asan] Disable non-execute test on s390Ulrich Weigand2018-07-101-0/+3
| | | | | | | | Processors before z14 don't support non-execute protection, so they will start execution random memory contents, causing the test to randomly fail or succeed. llvm-svn: 336705
* [compiler-rt] Get rid of "%T" expansionsFilipe Cabecinhas2018-07-1013-50/+56
| | | | | | | | | | | | | | | | | | | Summary: Original patch by Kuba Mracek The %T lit expansion expands to a common directory shared between all the tests in the same directory, which is unexpected and unintuitive, and more importantly, it's been a source of subtle race conditions and flaky tests. In https://reviews.llvm.org/D35396, it was agreed that it would be best to simply ban %T and only keep %t, which is unique to each test. When a test needs a temporary directory, it can just create one using mkdir %t. This patch removes %T in compiler-rt. Differential Revision: https://reviews.llvm.org/D48618 llvm-svn: 336661
* [asan] Change 3 tests from XFAIL to UNSUPPORTED.Evgeniy Stepanov2018-06-281-1/+1
| | | | | | The failure in https://github.com/google/sanitizers/issues/981 is flaky. llvm-svn: 335941
* [asan] Disable 3 tests on Android O+.Evgeniy Stepanov2018-06-281-0/+4
| | | | | | https://github.com/google/sanitizers/issues/981 llvm-svn: 335937
* [asan] un-XFAIL one testEvgeniy Stepanov2018-06-281-3/+0
| | | | | | | | | NDK r16 provides glob.h, which makes this test pass. Supporting different test outcomes depending on the version of NDK add unnecessary complexity to the test harness. IMHO, it's OK to require the latest stable release. llvm-svn: 335935
* [asan] Relax the null_deref.cc test even furtherVedant Kumar2018-06-271-2/+2
| | | | | | | | | | | | On Darwin/x86_64, asan may report the crashing line of NullDeref as line 19 (i.e the closing brace of the function), whereas on other targets we see line 15 ("ptr[10]++"). The optimized debug info here isn't reliable enough to check. rdar://problem/41526369 llvm-svn: 335747
* [asan] Relax a test which depends on optimized debug infoVedant Kumar2018-06-271-2/+2
| | | | | | | | | | | On some ARM platforms this test depends on debug locations being present on constant materialization code, which was eliminated in r335497. Relax the test to allow two outcomes: the backtrace either contains the right line numbers, or no line numbers. llvm-svn: 335741
* [asan] Add flushes to try to fix testReid Kleckner2018-06-201-1/+2
| | | | llvm-svn: 335089
* [asan] Add Windows test for handle_segv and SetUnhandledExceptionFilterReid Kleckner2018-06-201-0/+35
| | | | llvm-svn: 335087
* [asan] Enable fgets_fputs test on AndroidVitaly Buka2018-06-161-5/+2
| | | | | | | | | "echo data" didn't work because %run on android executes test on the device when lit shell command on the host system. https://github.com/google/sanitizers/issues/952 llvm-svn: 334883
* [asan] Move long-object-path.cc test to LinuxVitaly Buka2018-06-151-1/+0
| | | | | | | | | | | | Reviewers: Lekensteyn Reviewed By: Lekensteyn Subscribers: srhines, kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D48186 llvm-svn: 334866
* [ASAN] fix typos and disable long-object-path test for win32Peter Wu2018-06-141-0/+1
| | | | | | | | Glob patterns seem unsupported for commands executed by the emulated shell (LIT_USE_INTERNAL_SHELL=1). Disable the test while that is being addressed (a workaround such as "cd a-*" also does not work). llvm-svn: 334719
* [ASAN] fix startup crash in dlsym for long paths since glibc 2.27Peter Wu2018-06-141-0/+7
| | | | | | | | | | | | | | | | | | | | Summary: Error messages for dlsym used to be stored on the stack, but since commit 2449ae7b ("ld.so: Introduce struct dl_exception") in glibc 2.27 these are now stored on the heap (and thus use the dlsym alloc pool). Messages look like "undefined symbol: __isoc99_printf\0/path/to/a.out". With many missing library functions and long object paths, the pool is quickly exhausted. Implement a simple mechanism to return freed memory to the pool (clear it in case it is used for calloc). Fixes https://github.com/google/sanitizers/issues/957 Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D47995 llvm-svn: 334703
* [ASAN] Re-enable fgets_fputs test for darwin.Ahmed Bougacha2018-06-131-1/+1
| | | | | | It seems to be passing, at least on the bots I've seen. llvm-svn: 334626
* [ASAN] disable fgets_fputs test for android and darwinPeter Wu2018-06-121-0/+1
| | | | | | | | aarch64/aosp_marlin-userdebug/OPR4.170623.016] builder unexpectedly failed the fgets test (`assertion "fp" failed`). macOS unexpectedly passes the fputs test without triggering ASAN. llvm-svn: 334558
* [ASAN] fix fgets and fgets_fputs tests failurePeter Wu2018-06-121-15/+25
| | | | | | Some systems (Android) might not have /etc/passwd. Fixes r334450. llvm-svn: 334487
* [sanitizer] Add fgets, fputs and puts into sanitizer_commonPeter Wu2018-06-111-0/+46
| | | | | | | | | | | | | | | Summary: Add fgets, fputs and puts to sanitizer_common. This adds ASAN coverage for these functions, extends MSAN support from fgets to fputs/puts and extends TSAN support from puts to fputs. Fixes: https://github.com/google/sanitizers/issues/952 Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D46545 llvm-svn: 334450
* [Sanitizers] Move allocator_returns_null.cc test to common.Alex Shlyapnikov2018-06-111-133/+0
| | | | | | | | | | | | | | | | Summary: Add allocator_returns_null.cc test to sanitizer_common and remove all sanitizer-specific ones except: - HWASan is not covered by sanitizer_common - TSan allocator does not have comprehensive error reporting yet Reviewers: vitalybuka Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D47971 llvm-svn: 334433
* [Sanitizers] Move pvalloc overflow tests to common.Alex Shlyapnikov2018-06-111-46/+0
| | | | | | | | | | | | | | | | | | | Summary: Now all sanitizers with improved allocator error reporting are covered by these common tests. Also, add pvalloc-specific checks to LSan. HWASan is not covered by sanitizer_common, hence its own pvalloc and other allocator tests. Reviewers: vitalybuka Subscribers: srhines, kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D47970 llvm-svn: 334424
* [asan] Re-enable no_asan_gen_globals for 32-bitVitaly Buka2018-06-081-2/+0
| | | | | | PR22682. Bug in gold was fixed 3 years ago. llvm-svn: 334319
* [Sanitizers] Check alignment != 0 for aligned_alloc and posix_memalignAlex Shlyapnikov2018-06-082-47/+0
| | | | | | | | | | | | | | | Summary: Move the corresponding tests to the common folder (as all of the sanitizer allocators will support this feature soon) and add the checks specific to aligned_alloc to ASan and LSan allocators. Reviewers: vitalybuka Subscribers: srhines, kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D47924 llvm-svn: 334316
* [ASAN] Sanitize testsuite for ARM.Yvan Roux2018-06-0113-18/+12
| | | | | | | | | | | | | Address failures exhibited by ARMv8 bot in Thumb mode: - Fix logic for fast unwinding support (i.e feature is not available for Thumb) - Fix Unsupported and Requires rules to handle armv8 as well as soft and hard float targets - Un-xfail passing tests Differential Revision: https://reviews.llvm.org/D47575 llvm-svn: 333729
* Fix another case where libstdc++ is being inappropriately requested (seeDan Liew2018-05-142-48/+1
| | | | | | | | | | | | | | | | | | | r328775) for all platforms. Given that this is the second occurance of this problem it seemed worth fixing this problem in a more generic way. r328775 has been reverted and now a substitution `%linux_static_libstdcplusplus` has been provided. This substitution expands to Clang driver arguments to use a static libstdc++ on Linux and on all other platforms it expands to nothing. The `asan/TestCases/throw_invoke_test.cc` and `test/tsan/static_init6.cc` test cases now use this substitution. rdar://problem/39948818 Differential Revision: https://reviews.llvm.org/D46401 llvm-svn: 332254
* [asan] Align __asan_global_start so that it works with LLDReid Kleckner2018-04-261-0/+18
| | | | | | | | | | | Otherwise LLD will not align the .ASAN$GA section start, and &__asan_globals + 1 will not be the start of the next real ASan global metadata in .ASAN$GL. We discovered this issue when attempting to use LLD on Windows in Chromium: https://crbug.com/837090 llvm-svn: 330990
* asan: Mark printf-4.c as unsupported on Windows.Peter Collingbourne2018-04-201-2/+3
| | | | | | | | | Although sprintf is not intercepted on Windows, this test can pass if sprintf calls memmove, which is intercepted, so we can't XFAIL it. Differential Revision: https://reviews.llvm.org/D45894 llvm-svn: 330469
* [asan] Reduce flakiness in stack-overflow detectionKuba Mracek2018-04-131-1/+1
| | | | | | | | IsStackOverflow only treats accesses within 512 bytes of SP as stack-overflow. This should really be the size of a page instead. The scariness_score_test.cc triggers stack overflow with frames that are even larger than a page, which can also trigger a fault that will not be recognized as stack-overflow. Let's just use smaller frames. llvm-svn: 329980
* [compiler-rt][asan][mips] UnXFAIL some consistently passing testsSimon Dardis2018-04-102-8/+0
| | | | llvm-svn: 329688
* [asan] Fix aligned_alloc test caseKostya Kortchinsky2018-04-041-3/+2
| | | | | | | | | | | | | | | | | | | | | Summary: Under some circumstances (that I haven't dug further into), the first stack frame for the test looks like: `#0 0x4e6038 in __interceptor_memalign.localalias.1 ...compiler-rt/lib/asan/asan_malloc_linux.cc:113` which isn't matched by the current CHECK. Expand the CHECK to match aligned_alloc or memalign. Hopefully this should fix the PowerPC issue as well, otherwise we'll bring back the FIXME. Reviewers: alekseyshl Reviewed By: alekseyshl Subscribers: srhines, kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D45281 llvm-svn: 329226
* [ASan] Disable new ASan error reporting tests on various ARMs.Alex Shlyapnikov2018-03-305-0/+10
| | | | | | | | | As many other ASan tests already, has to disable these failing tests on arm, armhf and aarch64 configs. Differential Revision: https://reviews.llvm.org/D44404 llvm-svn: 328849
* [asan] Split the `throw_invoke_test.cc` into a Linux specific variantDan Liew2018-03-292-1/+48
| | | | | | | | | | | | and the general version to avoid use of libstdc++ on non-Linux platforms. This is motivated by the fact that using `libstdc++` is deprecated on Darwin and maybe removed some day. Differential Revision: https://reviews.llvm.org/D44733 llvm-svn: 328775
* [ASan] Disable aligned_alloc-alignment.cc on PPC64.Alex Shlyapnikov2018-03-291-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D44404 llvm-svn: 328753
OpenPOWER on IntegriCloud