summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test
Commit message (Collapse)AuthorAgeFilesLines
...
* [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
* [libFuzzer] DataFlow tracer now tags a subset of the input. A separate ↵Kostya Serebryany2018-05-241-7/+19
| | | | | | script merges traces from the subsets llvm-svn: 333149
* [libFuzzer] fix two off-by-ones (!!) in the data flow tracerKostya Serebryany2018-05-231-11/+9
| | | | llvm-svn: 333142
* [libFuzzer] change the output format for the DataFlow tracerKostya Serebryany2018-05-231-37/+10
| | | | llvm-svn: 333122
* [libFuzzer] add a stress test for the DataFlow tracerKostya Serebryany2018-05-232-2/+33
| | | | llvm-svn: 333119
* [libFuzzer] reinstate -dump_coverage, which is still in use (reverts r332036)Kostya Serebryany2018-05-211-0/+21
| | | | llvm-svn: 332876
* Do not link with -ldl in NetBSD/ASan testsKamil Rytarowski2018-05-191-2/+1
| | | | | | | | | | | | | | | | | | | Summary: The dlopen(3) features on NetBSD are in libc. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, kcc Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D46713 llvm-svn: 332790
* [msan] Don't check divisor shadow in fdiv.Evgeniy Stepanov2018-05-181-0/+17
| | | | | | | | | | | | | | | | Summary: Floating point division by zero or even undef does not have undefined behavior and may occur due to optimizations. Fixes https://bugs.llvm.org/show_bug.cgi?id=37523. Reviewers: kcc Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D47085 llvm-svn: 332761
* [builtins][macos] bump up the the macOS version min in os_version_check testsAlex Lorenz2018-05-172-2/+2
| | | | | | This ensures that the tests link with the latest OS. llvm-svn: 332647
* [libFuzzer] rename a test from .c to .cppKostya Serebryany2018-05-161-1/+1
| | | | llvm-svn: 332558
* [libFuzzer] add an experimental flag -focus_function: libFuzzer will try to ↵Kostya Serebryany2018-05-162-0/+32
| | | | | | focus on inputs that trigger that function llvm-svn: 332554
* [libFuzzer] add a symbolic execution puzzle (difficult for today's libFuzzer).Max Moroz2018-05-161-0/+4129
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This can be solved just in seconds with KLEE. Current libFuzzer is able to satistfy 101 constraints out of 410 constraints presented during the first hour of running with -use_value_profile=1 and -max_len=20. During the next 3 hours, libFuzzer is able to generate ~50 NEW inputs, bot none of those solve any new constraint. During the next 20 hours, it didn't find any NEW inputs. This test might be interesting for experimenting with the data flow tracing approach started in https://reviews.llvm.org/D46666. For the solution with KLEE and other information, see https://github.com/Dor1s/codegate2017-quals-angrybird Reviewers: kcc Reviewed By: kcc Subscribers: delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D46924 llvm-svn: 332507
* [sanitizer] Intercept __pthread_mutex_lock and __pthread_mutex_unlockVitaly Buka2018-05-151-0/+34
| | | | | | | | | | Reviewers: eugenis, dvyukov Subscribers: srhines, kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D46793 llvm-svn: 332320
* [libFuzzer] deprecate equivalence_serverKostya Serebryany2018-05-152-0/+2
| | | | llvm-svn: 332316
* Revert "[sanitizer] Intercept __pthread_mutex_lock and __pthread_mutex_unlock"Vitaly Buka2018-05-141-34/+0
| | | | | | | | Tsan tests fail. This reverts commit r332268 llvm-svn: 332276
OpenPOWER on IntegriCloud