summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test
Commit message (Collapse)AuthorAgeFilesLines
...
* [asan] Change 3 tests from XFAIL to UNSUPPORTED.Evgeniy Stepanov2018-06-283-3/+3
| | | | | | 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-283-0/+11
| | | | | | https://github.com/google/sanitizers/issues/981 llvm-svn: 335937
* [asan] Fix one more test on Android.Evgeniy Stepanov2018-06-281-3/+5
| | | | | | | | | | This change makes it pass both on libstdc++ and libc++-based toolchains. The error was: error: function-like macro '__GLIBC_PREREQ' is not defined ^ llvm-svn: 335936
* [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
* [fuzzer] Don't run tests on Android.Evgeniy Stepanov2018-06-281-1/+1
| | | | | | Need better build system support. llvm-svn: 335933
* [UBsan] minimal unit tests removing OpenBSD spacial caseDavid Carlier2018-06-281-6/+0
| | | | | | | | | | | | The OpenBSD driver now handles sanitisers with ld.lld automatically. Reviewers: vitalybuka Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D48740 llvm-svn: 335923
* [Darwin] Add an integration test for PGO + symbol exportsVedant Kumar2018-06-281-0/+11
| | | | | | rdar://41470205 llvm-svn: 335891
* Correct the test modified in rL335777.Haojian Wu2018-06-281-1/+1
| | | | llvm-svn: 335865
* Support for multiarch runtimes layoutPetr Hosek2018-06-287-14/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [libFuzzer] [Tests] [NFC] Change seed for reduce_inputs.testGeorge Karpenkov2018-06-281-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D48686 llvm-svn: 335802
* [libFuzzer] [NFC] [Tests] Mark signal handling tests as UNSUPPORTED on DarwinGeorge Karpenkov2018-06-272-2/+2
| | | | | | | | Under load, these tests tend to fail sporadically on our bots. In my understanding, the signal handling is not guaranteed to happen within 2 seconds, and the test is inherently flaky. llvm-svn: 335792
* Another shot at fixing android r335644 failureVlad Tsyrklevich2018-06-271-10/+15
| | | | | | | | | The android buildbot moves the build outputs to a different directory and rewrites the executable path, the DSO passed as an argument does not get re-written. Use rpaths to load the DSO the same way the test/cfi/cross-dso/ tests do and test the DSO name differently. llvm-svn: 335777
* [UBSan] Add silence_unsigned_overflow flag.Matt Morehouse2018-06-271-0/+2
| | | | | | | | | | | | | | | | | | | | Summary: Setting UBSAN_OPTIONS=silence_unsigned_overflow=1 will silence all UIO reports. This feature, combined with -fsanitize-recover=unsigned-integer-overflow, is useful for providing fuzzing signal without the excessive log output. Helps with https://github.com/google/oss-fuzz/issues/910. Reviewers: kcc, vsk Reviewed By: vsk Subscribers: vsk, kubamracek, Dor1s, llvm-commits Differential Revision: https://reviews.llvm.org/D48660 llvm-svn: 335762
* [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
* Fix another bot broken by r335644Vlad Tsyrklevich2018-06-271-1/+1
| | | | | | | The android sanitizer bot can't resolve the function name in the DSO and it's not relevant to the test. llvm-svn: 335693
* Fix test broken by r335644Vlad Tsyrklevich2018-06-261-2/+4
| | | | llvm-svn: 335657
* CFI: Print DSO names for failed cross-DSO icallsVlad Tsyrklevich2018-06-261-0/+42
| | | | | | | | | | | | Reviewers: pcc Reviewed By: pcc Subscribers: kubamracek, delcypher, llvm-commits, kcc, #sanitizers Differential Revision: https://reviews.llvm.org/D48583 llvm-svn: 335644
* [libFuzzer] Mark several tests UNSUPPORTED for aarch64.Matt Morehouse2018-06-266-3/+7
| | | | | | | Now that check-fuzzer runs as part of check-all, some aarch64 bots had tests failing. llvm-svn: 335639
* Mark mfcall.cpp as UNSUPPORTED: win32.Peter Collingbourne2018-06-261-0/+2
| | | | llvm-svn: 335573
* Implement CFI for indirect calls via a member function pointer.Peter Collingbourne2018-06-261-0/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similarly to CFI on virtual and indirect calls, this implementation tries to use program type information to make the checks as precise as possible. The basic way that it works is as follows, where `C` is the name of the class being defined or the target of a call and the function type is assumed to be `void()`. For virtual calls: - Attach type metadata to the addresses of function pointers in vtables (not the functions themselves) of type `void (B::*)()` for each `B` that is a recursive dynamic base class of `C`, including `C` itself. This type metadata has an annotation that the type is for virtual calls (to distinguish it from the non-virtual case). - At the call site, check that the computed address of the function pointer in the vtable has type `void (C::*)()`. For non-virtual calls: - Attach type metadata to each non-virtual member function whose address can be taken with a member function pointer. The type of a function in class `C` of type `void()` is each of the types `void (B::*)()` where `B` is a most-base class of `C`. A most-base class of `C` is defined as a recursive base class of `C`, including `C` itself, that does not have any bases. - At the call site, check that the function pointer has one of the types `void (B::*)()` where `B` is a most-base class of `C`. Differential Revision: https://reviews.llvm.org/D47567 llvm-svn: 335569
* [UBsan] Enable ubsan minimal unit tests on OpenBSDDavid Carlier2018-06-251-1/+7
| | | | | | | | | | | | | OpenBSD needs lld linker for sanitisers. Disabling lint checking as some symbols cannot be defined and block the proper unit tests launch. Reviewers: lebedev.ri, vitalybuka Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D48528 llvm-svn: 335524
* [ubsan] Mark a test case as unsupported on WindowsVedant Kumar2018-06-251-2/+7
| | | | | | | | | __ubsan_on_report isn't defined as weak, and redefining it in a test is not supported on Windows. See the error message here: https://reviews.llvm.org/D48446 llvm-svn: 335523
* [CMake] Run libFuzzer tests with check-all.Matt Morehouse2018-06-251-2/+0
| | | | | | | | | | | | Reviewers: kcc Reviewed By: kcc Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D48200 llvm-svn: 335519
* [ubsan] Add support for reporting diagnostics to a monitor processVedant Kumar2018-06-221-0/+37
| | | | | | | | | | | | | | | | | | Add support to the ubsan runtime for reporting diagnostics to a monitor process (e.g a debugger). The Xcode IDE uses this by setting a breakpoint on __ubsan_on_report and collecting diagnostic information via __ubsan_get_current_report_data, which it then surfaces to users in the editor UI. Testing for this functionality already exists in upstream lldb, here: lldb/packages/Python/lldbsuite/test/functionalities/ubsan Apart from that, this is `ninja check-{a,ub}san` clean. Differential Revision: https://reviews.llvm.org/D48446 llvm-svn: 335371
* [libFuzzer] Filter architectures for testing on Apple platforms.George Karpenkov2018-06-211-0/+4
| | | | | | This is done in all other sanitizers, and was missing on libFuzzer. llvm-svn: 335290
* [libFuzzer] Provide more descriptive names for testing targets.George Karpenkov2018-06-211-1/+1
| | | | llvm-svn: 335289
* [sanitizer] Stop running tests against 32-bit iOS simulatorKuba Mracek2018-06-211-0/+5
| | | | llvm-svn: 335245
* [TSan] fix build and couple of unit tests on FreeBSDDavid Carlier2018-06-202-0/+3
| | | | | | | | | | | | | Similarly to Msan adding -pie provokes linkage issue, was spotted with pie_test.cc Set to XFAIL for couple of unit tests. Reviewers: vitalybuka, krytarowski, dim Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D48317 llvm-svn: 335166
* Fix-up for r335123: Set default apple_platform to "osx".Kuba Mracek2018-06-201-1/+1
| | | | llvm-svn: 335133
* [sanitizer] Unify and generalize Apple platforms in CMake and lit test configsKuba Mracek2018-06-2012-47/+68
| | | | | | | | 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
* [asan] Add Windows test for handle_segv and SetUnhandledExceptionFilterReid Kleckner2018-06-201-0/+35
| | | | llvm-svn: 335087
* [XRay] rm GLOB || true -> rm -fFangrui Song2018-06-1912-21/+21
| | | | | | | | | | | | Summary: `rm -f` does not write diagnostic message when there is no file argument. Reviewers: dberris Subscribers: delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D48311 llvm-svn: 335025
* [TSan] Report proper error on allocator failures instead of CHECK(0)-ingAlex Shlyapnikov2018-06-185-159/+59
| | | | | | | | | | | | | | | | | | | | | | Summary: Following up on and complementing D44404 and other sanitizer allocators. Currently many allocator specific errors (OOM, for example) are reported as a text message and CHECK(0) termination, no stack, no details, not too helpful nor informative. To improve the situation, detailed and structured common errors were defined and reported under the appropriate conditions. Common tests were generalized a bit to cover a slightly different TSan stack reporting format, extended to verify errno value and returned pointer value check is now explicit to facilitate debugging. Reviewers: dvyukov Subscribers: srhines, kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D48087 llvm-svn: 334975
* [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
* [libFuzzer] Avoid -fuse-ld=lld on gc-sections.Matt Morehouse2018-06-151-2/+2
| | | | | | | The bot doesn't recognize lld as a linker even though it has the property lld-available. llvm-svn: 334864
* [SanitizerCoverage] Add associated metadata to pc-tables.Matt Morehouse2018-06-151-3/+3
| | | | | | | | | | | | | | | | | | | | Summary: Using associated metadata rather than llvm.used allows linkers to perform dead stripping with -fsanitize-coverage=pc-table. Unfortunately in my local tests, LLD was the only linker that made use of this metadata. Partially addresses https://bugs.llvm.org/show_bug.cgi?id=34636 and fixes https://github.com/google/sanitizers/issues/971. Reviewers: eugenis Reviewed By: eugenis Subscribers: Dor1s, hiraditya, llvm-commits, kcc Differential Revision: https://reviews.llvm.org/D48203 llvm-svn: 334858
* [scudo] Add verbose failures in place of CHECK(0)Kostya Kortchinsky2018-06-154-10/+16
| | | | | | | | | | | | | | | | | | | | | | | | Summary: The current `FailureHandler` mechanism was fairly opaque with regard to the failure reason due to using `CHECK(0)`. Scudo is a bit different from the other Sanitizers as it prefers to avoid spurious processing in its failure path. So we just `dieWithMessage` using a somewhat explicit string. Adapted the tests for the new strings. While this takes care of the `OnBadRequest` & `OnOOM` failures, the next step is probably to migrate the other Scudo failures in the same failes (header corruption, invalid state and so on). Reviewers: alekseyshl Reviewed By: alekseyshl Subscribers: filcab, mgorny, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D48199 llvm-svn: 334843
* [libFuzzer] [NFC] XFAIL one of the tests on iOS.George Karpenkov2018-06-141-0/+1
| | | | llvm-svn: 334775
* [libFuzzer] [NFC] Remaining minor fixes to support testing on devices.George Karpenkov2018-06-147-13/+15
| | | | | | XFAIL's and adding %run commands. llvm-svn: 334774
* [libFuzzer] [NFC] Support multi-arch and multi-OS building and testingGeorge Karpenkov2018-06-143-7/+38
| | | | | | Differential Revision: https://reviews.llvm.org/D47296 llvm-svn: 334768
* [libFuzzer] [NFC] Generalize DSO tests to work even when files are moved.George Karpenkov2018-06-142-8/+8
| | | | | | Differential Revision: https://reviews.llvm.org/D47292 llvm-svn: 334766
* [NFC] Generalize flags for linking in shared objects in compiler-rt tests to ↵George Karpenkov2018-06-141-18/+22
| | | | | | | | support using multiple shared objects at once Differential Revision: https://reviews.llvm.org/D48156 llvm-svn: 334765
* [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
* [libFuzzer] [NFC] Do not use hardcoded relative paths in tests.George Karpenkov2018-06-121-11/+12
| | | | | | | | | For paths without "%t" inside uniqueness is not guaranteed, and potential collisions might be present. Differential Revision: https://reviews.llvm.org/D47288 llvm-svn: 334546
OpenPOWER on IntegriCloud