summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test
Commit message (Collapse)AuthorAgeFilesLines
* [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
* [libFuzzer] [NFC] Make compiler command generation more readable.George Karpenkov2018-06-121-7/+20
| | | | | | | | Use config.clang as a more general option than config.c_compiler. Differential Revision: https://reviews.llvm.org/D47295 llvm-svn: 334545
* [Fuzzer] Afl driver changing iterations handlingDavid Carlier2018-06-121-2/+9
| | | | | | | | | | | | Handling differently the iterations with the type limit and eventually an error message. Reviewers: morehouse, kcc Reviewed By: morehouse Differential Revision: https://reviews.llvm.org/D47880 llvm-svn: 334510
* [scudo] Add C++17 aligned new/delete operators supportKostya Kortchinsky2018-06-121-0/+84
| | | | | | | | | | | | | | | | | | | Summary: This CL adds support for aligned new/delete operators (C++17). Currently we do not support alignment inconsistency detection on deallocation, as this requires a header change, but the APIs are introduced and are functional. Add a smoke test for the aligned version of the operators. Reviewers: alekseyshl Reviewed By: alekseyshl Subscribers: delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D48031 llvm-svn: 334505
* [ASAN] fix fgets and fgets_fputs tests failurePeter Wu2018-06-122-17/+27
| | | | | | Some systems (Android) might not have /etc/passwd. Fixes r334450. llvm-svn: 334487
* [XRay][profiler] Part 5: Profiler File WritingDean Michael Berris2018-06-122-10/+19
| | | | | | | | | | | | | | | | | | | | | | | Summary: This is part of the larger XRay Profiling Mode effort. This patch implements the profile writing mechanism, to allow profiles collected through the profiler mode to be persisted to files. Follow-on patches would allow us to load these profiles and start converting/analysing them through the `llvm-xray` tool. Depends on D44620. Reviewers: echristo, kpw, pelikan Reviewed By: kpw Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D45998 llvm-svn: 334472
* [XRay][profiler] Part 4: Profiler Mode WiringDean Michael Berris2018-06-123-1/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is part of the larger XRay Profiling Mode effort. This patch implements the wiring required to enable us to actually select the `xray-profiling` mode, and install the handlers to start measuring the time and frequency of the function calls in call stacks. The current way to get the profile information is by working with the XRay API to `__xray_process_buffers(...)`. In subsequent changes we'll implement profile saving to files, similar to how the FDR and basic modes operate, as well as means for converting this format into those that can be loaded/visualised as flame graphs. We will also be extending the accounting tool in LLVM to support stack-based function call accounting. We also continue with the implementation to support building small histograms of latencies for the `FunctionCallTrie::Node` type, to allow us to actually approximate the distribution of latencies per function. Depends on D45758 and D46998. Reviewers: eizan, kpw, pelikan Reviewed By: kpw Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D44620 llvm-svn: 334469
* [sanitizer] Add fgets, fputs and puts into sanitizer_commonPeter Wu2018-06-115-0/+160
| | | | | | | | | | | | | | | 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] %tool_options -> %env_tool_opts in allocator_returns_null.ccAlex Shlyapnikov2018-06-111-14/+14
| | | | | | Use proper substitution in the common allocator_returns_null.cc test. llvm-svn: 334438
* [Sanitizers] Move allocator_returns_null.cc test to common.Alex Shlyapnikov2018-06-113-320/+39
| | | | | | | | | | | | | | | | 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-113-92/+46
| | | | | | | | | | | | | | | | | | | 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
* [MSan] Switch to common aligned allocs tests.Alex Shlyapnikov2018-06-095-53/+8
| | | | | | | | | | | | | | Summary: Switch to aligned_alloc and posix_memalign tests in sanitizer_common and delete the MSan-specific ones. Reviewers: vitalybuka Subscribers: srhines, kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D47968 llvm-svn: 334340
* [MSan] Report proper error on allocator failures instead of CHECK(0)-ingAlex Shlyapnikov2018-06-084-10/+62
| | | | | | | | | | | | | | | | | | Summary: Following up on and complementing D44404. Currently many allocator specific errors (OOM, for example) are reported as a text message and CHECK(0) termination, not stack, no details, not too helpful nor informative. To improve the situation, detailed and structured errors were defined and reported under the appropriate conditions. Reviewers: eugenis Subscribers: srhines, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D47793 llvm-svn: 334338
* [Sanitizers] Use proper substitution in common allocator test.Alex Shlyapnikov2018-06-082-8/+8
| | | | | | Use %env_tool_ops instead of %tool_options. llvm-svn: 334332
* [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-086-94/+63
| | | | | | | | | | | | | | | 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
* [XRay][compiler-rt] Remove reliance on C++ ABI featuresDean Michael Berris2018-06-081-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This fixes http://llvm.org/PR32274. This change adds a test to ensure that we're able to link XRay modes and the runtime to binaries that don't need to depend on the C++ standard library or a C++ ABI library. In particular, we ensure that this will work with C programs compiled+linked with XRay. To make the test pass, we need to change a few things in the XRay runtime implementations to remove the reliance on C++ ABI features. In particular, we change the thread-safe function-local-static initialisation to use pthread_* instead of the C++ features that ensure non-trivial thread-local/function-local-static initialisation. Depends on D47696. Reviewers: dblaikie, jfb, kpw, eizan Reviewed By: kpw Subscribers: echristo, eizan, kpw, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D46998 llvm-svn: 334262
* [HWASan] Disable allocator_returns_null.cc test on Android.Alex Shlyapnikov2018-06-081-0/+3
| | | | | | | Disable test added in D47798 on Android and investigate why "new" behaves differently there. llvm-svn: 334255
* [HWASan] Report proper error on allocator failures instead of CHECK(0)-ingAlex Shlyapnikov2018-06-076-0/+226
| | | | | | | | | | | | | | | | Summary: Currently many allocator specific errors (OOM, for example) are reported as a text message and CHECK(0) termination, not stack, no details, not too helpful nor informative. To improve the situation, detailed and structured errors were defined and reported under the appropriate conditions. Reviewers: eugenis Subscribers: kubamracek, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D47798 llvm-svn: 334248
* [libFuzzer] make the corpus elements aware of their data flow tracesKostya Serebryany2018-06-071-0/+31
| | | | llvm-svn: 334158
* [libFuzzer] simplify a test, hopefully to fix the botKostya Serebryany2018-06-071-2/+2
| | | | llvm-svn: 334156
* [libFuzzer] initial implementation of -data_flow_trace. It parses the data ↵Kostya Serebryany2018-06-062-1/+14
| | | | | | flow trace and prints the summary, but doesn't use the information in any other way yet llvm-svn: 334058
* [lsan] Do not check for leaks in the forked processVitaly Buka2018-06-051-0/+35
| | | | | | | | | | | | | | | | Summary: If calling process had threads then forked process will fail to detect references from them. Fixes https://github.com/google/sanitizers/issues/836 Reviewers: alekseyshl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D47751 llvm-svn: 334036
* [LSan] Report proper error on allocator failures instead of CHECK(0)-ingAlex Shlyapnikov2018-06-054-12/+64
| | | | | | | | | | | | | | | | | | Summary: Following up on and complementing D44404. Currently many allocator specific errors (OOM, for example) are reported as a text message and CHECK(0) termination, not stack, no details, not too helpful nor informative. To improve the situation, detailed and structured errors were defined and reported under the appropriate conditions. Reviewers: eugenis Subscribers: srhines, mgorny, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D47645 llvm-svn: 334034
* Add weak definitions of trace-cmp hooks to dfsanKostya Serebryany2018-06-011-0/+50
| | | | | | | | | | | | | | | | | | | | | Summary: This allows to build and link the code with e.g. -fsanitize=dataflow -fsanitize-coverage=trace-pc-guard,pc-table,func,trace-cmp w/o providing (all) the definitions of trace-cmp hooks. This is similar to dummy hooks provided by asan/ubsan/msan for the same purpose, except that some of the hooks need to have the __dfsw_ prefix since we need dfsan to replace them. Reviewers: pcc Reviewed By: pcc Subscribers: delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D47605 llvm-svn: 333796
* [XRay] Fix supposely failing test for FreeBSDDavid Carlier2018-06-011-1/+1
| | | | | | | | | | | | One test was marked as XFAIL for FreeBSD however still running when launching make check-xray Reviewers: krytarowski, vitalybuka Reviewed By: dberris Differential Revision: https://reviews.llvm.org/D47622 llvm-svn: 333733
* [ASAN] Sanitize testsuite for ARM.Yvan Roux2018-06-0114-19/+13
| | | | | | | | | | | | | 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
* [libFuzzer] add collect_data_flow.py that allows to run the data-flow tracer ↵Kostya Serebryany2018-05-311-0/+5
| | | | | | several times on subsets of inputs bytes, to overcome DFSan out-of-label failures llvm-svn: 333616
* [MemorySanitizer] fix mmap test for oses not implementing MAP_NORESERVE flagDavid Carlier2018-05-251-1/+5
| | | | | | | | | | Reviewers: krytarowski, eugenis Reviewed By: eugenis Differential Revision: https://review.llvm.org/D47146 llvm-svn: 333306
* [libFuzzer] Avoid optimization of "abs(x) < 0"Vitaly Buka2018-05-252-2/+4
| | | | llvm-svn: 333295
* Revert "[libFuzzer] [NFC] Generalize DSO tests to work even when files are ↵Vitaly Buka2018-05-252-8/+8
| | | | | | | | | | moved." Breaks libFuzzer tests. This reverts commit r333243. llvm-svn: 333257
* [libFuzzer] [NFC] Generalize fdmask test.George Karpenkov2018-05-241-12/+12
| | | | | | | | | The ordering of stderr/stdout writes might not be guaranteed, and is irrelevant for this test. Differential Revision: https://reviews.llvm.org/D47294 llvm-svn: 333245
* [libFuzzer] [NFC] Do not remove SanitizerLintCheck from libFuzzer testsGeorge Karpenkov2018-05-241-1/+0
| | | | | | | | | With %run commands being present now, we want to make sure that they stay present. Differential Revision: https://reviews.llvm.org/D47293 llvm-svn: 333244
* [libFuzzer] [NFC] Generalize DSO tests to work even when files are moved.George Karpenkov2018-05-242-8/+8
| | | | | | Differential Revision: https://reviews.llvm.org/D47292 llvm-svn: 333243
* [libFuzzer] Fix multi-arch build support for fuzzer tests.George Karpenkov2018-05-241-5/+7
| | | | | | | | | The bug was not previously exposed as only one architecture is currently supported for libFuzzer. Differential Revision: https://reviews.llvm.org/D47287 llvm-svn: 333242
* [libFuzzer] XFAIL a few libFuzzer tests on iOS.George Karpenkov2018-05-248-0/+8
| | | | | | | | NFC for now. Differential Revision: https://reviews.llvm.org/D47284 llvm-svn: 333240
* [tsan] Fix a failure in test java_race_pc on AArch64 after r333071Igor Kudrin2018-05-241-1/+1
| | | | llvm-svn: 333180
OpenPOWER on IntegriCloud