summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test
Commit message (Collapse)AuthorAgeFilesLines
...
* [sanitizer] Use AT_EXECFN in ReExec() if availableBenjamin Kramer2018-11-061-0/+23
| | | | | | | | | | execve("/proc/self/exe") will not work if the binary relies on $EXEC_ORIGIN in an rpath. Query AT_EXECFN instead, which will give the same string that the current binary was exec'd with. Differential Revision: https://reviews.llvm.org/D54113 llvm-svn: 346215
* [XRay] Update XRayRecord to support Custom/Typed EventsDean Michael Berris2018-11-065-33/+33
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change cuts across LLVM and compiler-rt to add support for rendering custom events in the XRayRecord type, to allow for including user-provided annotations in the output YAML (as raw bytes). This work enables us to add custom event and typed event records into the `llvm::xray::Trace` type for user-provided events. This can then be programmatically handled through the C++ API and can be included in some of the tooling as well. For now we support printing the raw data we encounter in the custom events in the converted output. Future work will allow us to start interpreting these custom and typed events through a yet-to-be-defined API for extending the trace analysis library. Reviewers: mboerger Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D54139 llvm-svn: 346214
* Disable XRay test fork_basic_logging for NetBSDKamil Rytarowski2018-11-061-0/+3
| | | | | | This code has not been ported so far. llvm-svn: 346196
* [libFuzzer] Disable value-profile-cmp.test and fuzzer-oom.test on ARM64George Karpenkov2018-11-063-4/+3
| | | | | | | | | | value-profile-cmp was always flaky, and OOM fails to work in some environments. counters.test fails when vectorization is enabled, and it is more likely to kick in when compiling for ARM. Differential Revision: https://reviews.llvm.org/D54004 llvm-svn: 346193
* [UBsan] disable few tests for FreeBSDDavid Carlier2018-11-052-0/+4
| | | | | | | | | | Reviewers: krytarowsky, vitalybuka Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D54103 llvm-svn: 346145
* [hwasan] Fix stack-uar.c after rCRT345110Fangrui Song2018-11-051-1/+1
| | | | | | Set -fno-discard-value-names so that the frame description string contains the variable name. llvm-svn: 346120
* Workaround using new Clang with an old NDK.Dan Albert2018-11-021-0/+1
| | | | | | | | | We're using an old NDK and a new Clang. New Clangs default to `-stdlib=libc++` for Android, but those libraries cannot be found by default with an old NDK. Use an explicit `-stdlib=libstdc++` in the cxx_mode_flags. llvm-svn: 346051
* Compile and test i128 math builtins for Win64Reid Kleckner2018-11-0138-47/+94
| | | | | | | | | | | | | | | | | | | | | Summary: Windows has always been LLP64, not LP64, so the macros were incorrect. Check for _WIN64, since AArch64 sets that too. The tests have to be fixed up in two main ways: 1. Use 'ULL' suffixes to avoid sign extension when passing hex literals with the sign bit set to signed 128 arguments. Clang -fms-compatibility makes such hex literals signed, not unsigned. 2. Disable various tests for 80-bit long double interoperation with i128 values. Reviewers: joerg, mstorsjo Subscribers: javed.absar, kristof.beyls, hiraditya, aheejin, llvm-commits Differential Revision: https://reviews.llvm.org/D53918 llvm-svn: 345796
* 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
* [NFC][compiler-rt] Cleanup Implicit Conversion Sanitizer tests to use sized ↵Roman Lebedev2018-10-3015-249/+257
| | | | | | | | | | | | | | | | | | types Summary: As requested by @filcab in https://reviews.llvm.org/D50251#1280267 Reviewers: filcab, vsk, #sanitizers, vitalybuka Reviewed By: filcab, #sanitizers, vitalybuka Subscribers: vitalybuka, kubamracek, dberris, llvm-commits, filcab Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D53869 llvm-svn: 345661
* [compiler-rt][ubsan] Implicit Conversion Sanitizer - integer sign change - ↵Roman Lebedev2018-10-3013-3/+878
| | | | | | | | | | | | | | | | | | | | | | compiler-rt part Summary: This is a compiler-rt part. The clang part is D50250. See [[ https://bugs.llvm.org/show_bug.cgi?id=21530 | PR21530 ]], https://github.com/google/sanitizers/issues/940. Reviewers: vsk, filcab, #sanitizers Reviewed By: filcab, #sanitizers Subscribers: mclow.lists, srhines, kubamracek, dberris, rjmccall, rsmith, llvm-commits, regehr Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D50251 llvm-svn: 345659
* [GCOV] Make test path generic so it passes on all machinesMarco Castelluccio2018-10-301-1/+1
| | | | llvm-svn: 345656
* Switch getline_nohang from XFAIL to UNSUPPORTED for NetBSDKamil Rytarowski2018-10-301-2/+2
| | | | | | This test sometimes works, usually breaks. llvm-svn: 345655
* Mark vptr-non-unique-typeinfo as a broken test for NetBSD/i386Kamil Rytarowski2018-10-301-0/+1
| | | | llvm-svn: 345654
* Mark breaking sanitizer_common tests on NetBSDKamil Rytarowski2018-10-304-0/+7
| | | | | | | | | | Set XFAIL with appropriate configuration for: - NetBSD/getgroupmembership - Posix/dedup_token_length_test - Posix/readlinkat - get_module_and_offset_for_pc llvm-svn: 345651
* [builtins] Re-enable x86-only long double testsReid Kleckner2018-10-301-1/+1
| | | | | | | | | | | | | | | | | | | Summary: In r81552, the HAS_80_BIT_LONG_DOUBLE macro was added to the unit test only version of int_lib.h. One month later in r85260 the duplicate int_lib.h was removed, but the tests still passed because we don't build with -Werror. This is the minimal change to bring it back, and I decided to put the configuration macro next to our 128-bit integer support macro. Reviewers: joerg, compnerd, mstorsjo Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D53838 llvm-svn: 345645
* [GCOV] Add a test for function defined on one line (follow-up of ↵Calixte Denizet2018-10-303-0/+36
| | | | | | | | | | | | | | | | https://reviews.llvm.org/D53600) Summary: Add a test for coverage for function definition like void foo() { }. Reviewers: marco-c Reviewed By: marco-c Subscribers: delcypher, llvm-commits, #sanitizers, sylvestre.ledru Differential Revision: https://reviews.llvm.org/D53601 llvm-svn: 345625
* 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 breaking TSan tests on NetBSD with XFAILKamil Rytarowski2018-10-303-1/+5
| | | | | | | | | Failing tests: - dtls - ignored-interceptors-mmap - mutex_lock_destroyed llvm-svn: 345595
* Mark test/tsan/getline_nohang as XFAIL for NetBSDKamil Rytarowski2018-10-291-0/+3
| | | | llvm-svn: 345493
* Disable the GNU strerror_r TSan test for NetBSDKamil Rytarowski2018-10-291-5/+3
| | | | | | | | | Revert older change that was incorrect in this test. It was already reverted in the past after an attempt to port it to Darwin. While there, mark FreeBSD as unsupported as well. llvm-svn: 345492
* Mark test/tsan/ignore_lib5 as unsupported for NetBSDKamil Rytarowski2018-10-291-1/+3
| | | | | | ReadProcMaps() on NetBSD does not handle >=1MB of memory layout information. llvm-svn: 345490
* [sanitizer] Fix mallopt test on Android.Evgeniy Stepanov2018-10-261-1/+2
| | | | | | | There is not a single common mallopt option between gnu/linux and android, so simply use a random number there. llvm-svn: 345394
* [sanitizer] Fix mallopt interceptor.Evgeniy Stepanov2018-10-251-0/+9
| | | | | | On error, mallopt is supposed to return 0, not -1. llvm-svn: 345323
* [hwasan] when printing a stack-related bugs, also print stack frame ↵Kostya Serebryany2018-10-241-2/+6
| | | | | | descriptions provided by the compiler llvm-svn: 345110
* [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
* [SanitizerCoverage] Prevent /OPT:REF from stripping constructorsJonathan Metzman2018-10-121-0/+9
| | | | | | | | | | | | | | | | | | | | | Summary: Linking with the /OPT:REF linker flag when building COFF files causes the linker to strip SanitizerCoverage's constructors. Prevent this by giving the constructors WeakODR linkage and by passing the linker a directive to include sancov.module_ctor. Include a test in compiler-rt to verify libFuzzer can be linked using /OPT:REF Reviewers: morehouse, rnk Reviewed By: morehouse, rnk Subscribers: rnk, morehouse, hiraditya Differential Revision: https://reviews.llvm.org/D52119 llvm-svn: 344391
* [libFuzzer] Add test for SanitizerCoverage working on Mac even with ↵Max Moroz2018-10-121-0/+23
| | | | | | | | | | | | | | | | | | | -Wl,-dead_strip. Summary: The corresponding asncov change: https://reviews.llvm.org/D53113. Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=892167 Reviewers: morehouse, kcc, george.karpenkov Reviewed By: morehouse, george.karpenkov Subscribers: delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D53114 llvm-svn: 344346
* 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
* [hwasan] relax a testKostya Serebryany2018-10-111-3/+3
| | | | llvm-svn: 344289
* [compiler-rt][ubsan] Split Implicit Integer Truncation Sanitizer into ↵Roman Lebedev2018-10-1114-34/+816
| | | | | | | | | | | | | | | | unsigned and signed checks Summary: This is compiler-rt part. clang part is D50901. Reviewers: rsmith, vsk, filcab, Sanitizers Reviewed by: filcab Differential Revision: https://reviews.llvm.org/D50902 llvm-svn: 344231
* [profile] Fix the gcov tests after the patch in D49853 landed.Calixte Denizet2018-10-1114-19/+19
| | | | | | | | | | | | | | | | Summary: The goal of the patch in D49853 is to display counter on the line of function definition. So some tests need to be fixed. Reviewers: marco-c, davidxl Reviewed By: marco-c Subscribers: sylvestre.ledru, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D49854 llvm-svn: 344229
* [hwasan] extend the stack-uar testKostya Serebryany2018-10-111-6/+20
| | | | llvm-svn: 344213
* [hwasan] simplify a testKostya Serebryany2018-10-101-5/+5
| | | | llvm-svn: 344203
* [hwasan] when reporting a bug, print some very basic information about the ↵Kostya Serebryany2018-10-102-2/+14
| | | | | | heap chunk (in addition to the more detailed info that we may fail to show) llvm-svn: 344193
* [hwasan] print all threads in a bug reportKostya Serebryany2018-10-101-0/+2
| | | | llvm-svn: 344174
* [libFuzzer] Disable value profiling tests on ARMGeorge Karpenkov2018-10-107-2/+7
| | | | | | | | | Some seem fragile, some fail, and some just take a really long time to run. It does not seem to make sense to support some subset of value profiling tests. Differential Revision: https://reviews.llvm.org/D53047 llvm-svn: 344105
* [libFuzzer] Generalize the code for getting the previous offset for ↵George Karpenkov2018-10-103-3/+3
| | | | | | | | | | | | | different architectures Without this change, tests in coverage.test and dump_coverage.test are failing on non-x86_64 platforms. The diff is copied from sanitizer_common library, an alternative would be to link it together with libFuzzer. Differential Revision: https://reviews.llvm.org/D53040 llvm-svn: 344104
* 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
* Mark 4 MSan tests as XFAIL for NetBSDKamil Rytarowski2018-10-094-0/+12
| | | | | | | | | | Failing ones: - chained_origin_with_signals - dtls_test - ioctl_custom - signal_stress_test llvm-svn: 344041
* Mark MSan fork test as UNSUPPORTED on NetBSDKamil Rytarowski2018-10-091-0/+3
| | | | | | This test sometimes hangs for unknown reason. llvm-svn: 344038
* Reflect the current reality and disable lsan tests on NetBSDKamil Rytarowski2018-10-091-0/+1
| | | | | | LSan/NetBSD is still in development (Stop-The-World routine missed). llvm-svn: 344035
* 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
* Don't harcode -ldl test/sanitizer_common/TestCasesKamil Rytarowski2018-10-084-3/+9
| | | | | | | | | | | | | | | | | | | | Summary: The dl library does not exist on all system and in particular this breaks build on NetBSD. Make it conditional and enable only for Linux, following the approach from other test suites in the same repository. Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D52994 llvm-svn: 343987
* Disable TestCases/pthread_mutexattr_get on NetBSDKamil Rytarowski2018-10-081-0/+3
| | | | | | The pshared feature is unsupported on NetBSD as of today. llvm-svn: 343981
* Fix Posix/devname_r for NetBSDKamil Rytarowski2018-10-081-0/+5
| | | | | | | | | | | | | | | | NetBSD returns a different type as a return value of devname_r(3) than FreeBSD and Darwin (int vs char*). This implies that checking for successful completion of this function has to be handled differently. This test used to work well, but was switched to fix Darwin, which broke NetBSD. Add a dedicated ifdef for NetBSD and make it functional again for this OS. llvm-svn: 343980
* 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
OpenPOWER on IntegriCloud