summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/asan
Commit message (Collapse)AuthorAgeFilesLines
...
* [asan] Disable test on powerpc64beVitaly Buka2018-12-201-0/+3
| | | | llvm-svn: 349844
* [sanitizer] Support running without fd 0,1,2.Evgeniy Stepanov2018-12-201-0/+39
| | | | | | | | | | | | | | | | | | | Summary: Support running with no open file descriptors (as may happen to "init" process on linux). * Remove a check that writing to stderr succeeds. * When opening a file (ex. for log_path option), dup the new fd out of [0, 2] range to avoid confusing the program. (2nd attempt, this time without the sanitizer_rtems change) Reviewers: pcc, vitalybuka Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D55801 llvm-svn: 349817
* Revert "[sanitizer] Support running without fd 0,1,2."Ilya Biryukov2018-12-201-39/+0
| | | | | | | | This reverts commit r349699. Reason: the commit breaks compilation of sanitizer_rtems.cc when building for RTEMS. llvm-svn: 349745
* [asan] Revert still Androind incompatible tests enabled in r349736Vitaly Buka2018-12-202-0/+4
| | | | llvm-svn: 349740
* [asan] Fix and re-enable few test on AndroidVitaly Buka2018-12-206-38/+23
| | | | llvm-svn: 349736
* [asan] Disable test incompatible with new AndroidVitaly Buka2018-12-201-0/+4
| | | | llvm-svn: 349705
* [sanitizer] Support running without fd 0,1,2.Evgeniy Stepanov2018-12-191-0/+39
| | | | | | | | | | | | | | | | | Summary: Support running with no open file descriptors (as may happen to "init" process on linux). * Remove a check that writing to stderr succeeds. * When opening a file (ex. for log_path option), dup the new fd out of [0, 2] range to avoid confusing the program. Reviewers: pcc, vitalybuka Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D55801 llvm-svn: 349699
* [asan] Disable ODR test on AndroidVitaly Buka2018-12-191-0/+3
| | | | llvm-svn: 349585
* [asan] Restore ODR-violation detection on vtablesVitaly Buka2018-12-181-0/+26
| | | | | | | | | | | | | | | | | | | Summary: unnamed_addr is still useful for detecting of ODR violations on vtables Still unnamed_addr with lld and --icf=safe or --icf=all can trigger false reports which can be avoided with --icf=none or by using private aliases with -fsanitize-address-use-odr-indicator Reviewers: eugenis Reviewed By: eugenis Subscribers: kubamracek, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D55799 llvm-svn: 349555
* Mark interception_failure_test.cc as passing for NetBSD and asan-dynamic-runtimeKamil Rytarowski2018-12-141-1/+5
| | | | llvm-svn: 349159
* Set shared_libasan_path in lit tests for NetBSDKamil Rytarowski2018-12-141-1/+1
| | | | | | Reuse the Linux code path. llvm-svn: 349156
* [asan] Don't check ODR violations for particular types of globalsVitaly Buka2018-12-131-0/+26
| | | | | | | | | | | | | | | | | Summary: private and internal: should not trigger ODR at all. unnamed_addr: current ODR checking approach fail and rereport false violation if a linker merges such globals linkonce_odr, weak_odr: could cause similar problems and they are already not instrumented for ELF. Reviewers: eugenis, kcc Subscribers: kubamracek, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D55621 llvm-svn: 349015
* [asan] Add clang flag -fsanitize-address-use-odr-indicatorVitaly Buka2018-12-051-0/+5
| | | | | | | | | | Reviewers: eugenis, m.ostapenko, ygribov Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D55157 llvm-svn: 348327
* [asan] Split -asan-use-private-alias to -asan-use-odr-indicatorVitaly Buka2018-12-041-1/+6
| | | | | | | | | | Reviewers: eugenis, m.ostapenko, ygribov Subscribers: mehdi_amini, kubamracek, hiraditya, steven_wu, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D55156 llvm-svn: 348316
* [asan] Remove use_odr_indicator runtime flagVitaly Buka2018-12-043-6/+4
| | | | | | | | | | | | | | Summary: Flag was added for testing 3 years ago. Probably it's time to simplify code and usage by removing it. Reviewers: eugenis, m.ostapenko Subscribers: mehdi_amini, kubamracek, steven_wu, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D55254 llvm-svn: 348315
* Introduce a way to allow the ASan dylib on Darwin platforms to be loaded via ↵Dan Liew2018-12-011-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `dlopen()`. Summary: The purpose of this option is provide a way for the ASan dylib to be loaded via `dlopen()` without triggering most initialization steps (e.g. shadow memory set up) that normally occur when the ASan dylib is loaded. This new functionality is exposed by - A `SANITIZER_SUPPORTS_INIT_FOR_DLOPEN` macro which indicates if the feature is supported. This only true for Darwin currently. - A `HandleDlopenInit()` function which should return true if the library is being loaded via `dlopen()` and `SANITIZER_SUPPORTS_INIT_FOR_DLOPEN` is supported. Platforms that support this may perform any initialization they wish inside this function. Although disabling initialization is something that could potentially apply to other sanitizers it appears to be unnecessary for other sanitizers so this patch only makes the change for ASan. rdar://problem/45284065 Reviewers: kubamracek, george.karpenkov, kcc, eugenis, krytarowski Subscribers: #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D54469 llvm-svn: 348078
* [compiler-rt] Use "ColumnLimit: 0" instead of "clang-format off" in testsVitaly Buka2018-12-011-2/+0
| | | | | | | | | | Reviewers: eugenis, jfb Subscribers: kubamracek, dberris, llvm-commits Differential Revision: https://reviews.llvm.org/D55152 llvm-svn: 348061
* Revert r346560 "[winasan] Unpoison the stack in NtTerminateThread"Reid Kleckner2018-11-291-1/+0
| | | | | | | | | | | This reverts r343606 again. The NtTerminateThread interceptor is causing problems in NaCl: https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/CrWinAsan/1839 I reproduced the problem locally and tried my best to debug them, but it's beyond me. llvm-svn: 347933
* Re-land r343606 "[winasan] Unpoison the stack in NtTerminateThread"Reid Kleckner2018-11-091-0/+1
| | | | | | | | | This change was reverted because it caused some nacl tests in chromium to fail. I attempted to reproduce those problems locally, but I was unable to. Let's reland this and let Chromium's test infrastructure discover any problems. llvm-svn: 346560
* 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
* [lit] Support the `%shared_libasan` lit substitution on Apple platforms.Dan Liew2018-10-121-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The previous value looks Linux specific so that has been guarded with the host OS being Linux. On Apple platforms `%shared_libasan` expands to the absolute path of the ASan dylib. Previously on Linux `%shared_libasan` expanded to just the file name of the shared library rather than the absolute path to the library. This is likely a bug because it would rely on the OS's dynamic linker to find the shared library which could accidentally pick up a system copy rather than the shared library that was just built. For other platforms we emit a warning if `config.asan_dynamic` is true. This patch also only defines the substitution when `config.asan_dynamic` is true because using this substitution only makes sense when the dynamic library is available. Reviewers: kubamracek, george.karpenkov, mgorny, phosek, etienneb, samsonov, kcc Subscribers: #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D53111 llvm-svn: 344434
* Fix bug where `config.asan_dynamic` in generated ASan `lit.site.cfg` files ↵Dan Liew2018-10-121-1/+1
| | | | | | | | | | | | | | | was set to `False` for macOS. `config.asan_dynamic` should actually be `True` because dylibs are the only supported form of the ASan runtime on Apple platforms. Reviewers: kubamracek, george.karpenkov, samsonov Subscribers: srhines, mgorny, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D53183 llvm-svn: 344324
* 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
* Support for multiarch runtimes layoutPetr Hosek2018-06-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This change adds a support for multiarch style runtimes layout, so in addition to the existing layout where runtimes get installed to: lib/clang/$version/lib/$os Clang now allows runtimes to be installed to: lib/clang/$version/$target/lib This also includes libc++, libc++abi and libunwind; today those are assumed to be in Clang library directory built for host, with the new layout it is possible to install libc++, libc++abi and libunwind into the runtime directory built for different targets. The use of new layout is enabled by setting the LLVM_ENABLE_RUNTIME_TARGET_DIR CMake variable and is supported by both projects and runtimes layouts. The runtimes CMake build has been further modified to use the new layout when building runtimes for multiple targets. Differential Revision: https://reviews.llvm.org/D45604 llvm-svn: 335809
* [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
* [sanitizer] Unify and generalize Apple platforms in CMake and lit test configsKuba Mracek2018-06-203-15/+7
| | | | | | | | There's more platforms than just "ios" and "iossim" that we should support, and adding more lit config variables for each platform isn't great. Let's generalize and have a single value that determines what the platform under test is. Differential Revision: https://reviews.llvm.org/D48309 llvm-svn: 335123
* [asan] Add flushes to try to fix testReid Kleckner2018-06-201-1/+2
| | | | llvm-svn: 335089
OpenPOWER on IntegriCloud