summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/fuzzer
Commit message (Collapse)AuthorAgeFilesLines
...
* [libFuzzer] Disable handle-unstable.test for ARM and delete duplicated test ↵Max Moroz2018-07-252-12/+3
| | | | | | | | | | | | | | | | | | file. Summary: This change should fix the failures mentioned in https://reviews.llvm.org/D49684#1175245 Reviewers: kevinwkt, morehouse, metzman Reviewed By: kevinwkt, morehouse Subscribers: kristof.beyls, delcypher, chrib, #sanitizers, llvm-commits, kcc Differential Revision: https://reviews.llvm.org/D49810 llvm-svn: 337949
* [libFuzzer] Handle unstable edges by disregarding unstable edgesMax Moroz2018-07-241-0/+39
| | | | | | | | | | | | | | | | | | | | Summary: Added a new mode within flag -handle_unstable for new unstable handling algorithm that does the following: When an edge is shown as unstable, copy to UnstableCounters the value 0. During ApplyUnstableCounters we copy back the value 0 to ModuleInline8bitCounters if the edge was unstable. This way we would be ignoring completely features that were collected through non-determinism. Unstable hits would be counted as if it never hit. Reviewers: metzman, Dor1s, kcc, morehouse Reviewed By: metzman, morehouse Subscribers: delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D49684 llvm-svn: 337853
* [libFuzzer] Handle unstable edges by using minimum hit countsMax Moroz2018-07-231-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Created unstable_handle flag that takes 1 or 2, depending on the handling type. Modified RunOne to accommodate the following heuristic: Use the first CollectFeatures to count how many features there are. If no new features, CollectFeatures like before. If there is new feature, we run CB 2 more times, Check which edges are unstable per input and we store the least amount of hit counts for each edge. Apply these hit counts back to inline8bitcounters so that CollectFeatures can work as intended. Modified UnstableCounters to 8int_t and created a bitset UnstableSet to tell which edges are unstable. Patch by Kyungtak Woo (@kevinwkt). Reviewers: Dor1s, metzman, morehouse Reviewed By: Dor1s, morehouse Subscribers: delcypher, #sanitizers, llvm-commits, kcc Differential Revision: https://reviews.llvm.org/D49525 llvm-svn: 337696
* [libFuzzer] Use separate test directory for each configJoel E. Denny2018-07-201-2/+0
| | | | | | | | | | | | | | Previously, check-all failed many tests for me. It was running the X86_64DefaultLinuxConfig, X86_64LibcxxLinuxConfig, and X86_64StaticLibcxxLinuxConfig configs out of llvm-build/projects/compiler-rt/test/fuzzer. Now, it runs them out of separate subdirectories there, and most tests pass. Reviewed By: morehouse, george.karpenkov Differential Revision: https://reviews.llvm.org/D49249 llvm-svn: 337521
* [libFuzzer] when -print_coverage=1 is given, print more stats (the number of ↵Kostya Serebryany2018-07-192-2/+5
| | | | | | seeds that hit every given function) llvm-svn: 337501
* [libFuzzer] quick hack to fix the botKostya Serebryany2018-07-191-0/+1
| | | | llvm-svn: 337436
* [libFuzzer] first experimental attempt at DFT-based mutations ↵Kostya Serebryany2018-07-191-6/+12
| | | | | | (DFT=data-flow-trace) llvm-svn: 337434
* [libFuzzer] Mutation tracking and logging implemented.Max Moroz2018-07-171-0/+5
| | | | | | | | | | | | | | | | | | | Summary: Code now exists to track number of mutations that are used in fuzzing in total and ones that produce new coverage. The stats are currently being dumped to the command line. Patch by Kodé Williams (@kodewilliams). Reviewers: metzman, Dor1s, morehouse, kcc Reviewed By: Dor1s, morehouse, kcc Subscribers: delcypher, kubamracek, kcc, morehouse, llvm-commits, #sanitizers, mgorny Differential Revision: https://reviews.llvm.org/D48054 llvm-svn: 337324
* libFuzzer: prevent irrelevant strings from leaking into auto-dictionaryMatt Morehouse2018-07-171-2/+2
| | | | | | | | | | | | | | | | This is a fix for bug 37047. https://bugs.llvm.org/show_bug.cgi?id=37047 Implemented by basically reversing the logic. Previously all strings were considered, with some operations excluded. Now strings are excluded by default, and only strings during the CB considered. Patch By: pdknsk Differential Revision: https://reviews.llvm.org/D48800 llvm-svn: 337296
* [libFuzzer] Avoid STL in MSan test.Matt Morehouse2018-07-162-1/+27
| | | | | | | | | | | | | | | | Summary: STL can cause MSan false positives if lib[std]c++ isn't instrumented with MSan. Reviewers: kcc Reviewed By: kcc Subscribers: Dor1s, llvm-commits Differential Revision: https://reviews.llvm.org/D49404 llvm-svn: 337224
* Revert r337194 (https://reviews.llvm.org/D48891) due to compilation errors.Max Moroz2018-07-161-5/+0
| | | | llvm-svn: 337206
* [cmake][libFuzzer] fixup r337193 to ensure msan/dfsan are not addedAlex Lorenz2018-07-161-1/+7
| | | | | | to test deps for libfuzzer when they're not supported by the platform llvm-svn: 337203
* [libFuzzer] Mutation tracking and logging implemented.Max Moroz2018-07-161-0/+5
| | | | | | | | | | | | | | | | | | | Summary: Code now exists to track number of mutations that are used in fuzzing in total and ones that produce new coverage. The stats are currently being dumped to the command line. Patch by Kodé Williams (@kodewilliams). Reviewers: metzman, Dor1s, morehouse, kcc Reviewed By: Dor1s, morehouse, kcc Subscribers: delcypher, kubamracek, kcc, morehouse, llvm-commits, #sanitizers, mgorny Differential Revision: https://reviews.llvm.org/D48054 llvm-svn: 337194
* [libFuzzer] Add msan and dfsan to test deps.Matt Morehouse2018-07-161-1/+1
| | | | | | Required now that we have tests using MSan and DFSan. llvm-svn: 337193
* [libFuzzer] Implement stat::stability_rate based on the percentage of ↵Max Moroz2018-07-162-0/+72
| | | | | | | | | | | | | | | | | | | | | unstable edges. Summary: Created a -print_unstable_stats flag. When -print_unstable_stats=1, we run it 2 more times on interesting inputs poisoning unstable edges in an array. On program termination, we run PrintUnstableStats() which will print a line with a stability percentage like AFL does. Patch by Kyungtak Woo (@kevinwkt). Reviewers: metzman, Dor1s, kcc, morehouse Reviewed By: metzman, Dor1s, morehouse Subscribers: delcypher, llvm-commits, #sanitizers, kcc, morehouse, Dor1s Differential Revision: https://reviews.llvm.org/D49212 llvm-svn: 337187
* Revert r337175 (https://reviews.llvm.org/D49212) due to unintentional format ↵Max Moroz2018-07-162-72/+0
| | | | | | changes. llvm-svn: 337180
* [libFuzzer] Implement stat::stability_rate based on the percentage of ↵Max Moroz2018-07-162-0/+72
| | | | | | | | | | | | | | | | | | | | | unstable edges. Summary: Created a -print_unstable_stats flag. When -print_unstable_stats=1, we run it 2 more times on interesting inputs poisoning unstable edges in an array. On program termination, we run PrintUnstableStats() which will print a line with a stability percentage like AFL does. Patch by Kyungtak Woo (@kevinwkt). Reviewers: metzman, Dor1s, kcc, morehouse Reviewed By: metzman, Dor1s, morehouse Subscribers: delcypher, llvm-commits, #sanitizers, kcc, morehouse, Dor1s Differential Revision: https://reviews.llvm.org/D49212 llvm-svn: 337175
* [fuzzer] [tests] Increase the number of iterations for three-bytes.testGeorge Karpenkov2018-07-131-1/+1
| | | | | | | | The test is flaky otherwise on some of our macOS machines in the test fleet. Differential Revision: https://reviews.llvm.org/D49277 llvm-svn: 336966
* [SanitizerCoverage] Add associated metadata to 8-bit counters.Matt Morehouse2018-07-121-1/+3
| | | | | | | | | | | | | | | | | | | | Summary: This allows counters associated with unused functions to be dead-stripped along with their functions. This approach is the same one we used for PC tables. Fixes an issue where LLD removes an unused PC table but leaves the 8-bit counter. Reviewers: eugenis Reviewed By: eugenis Subscribers: llvm-commits, hiraditya, kcc Differential Revision: https://reviews.llvm.org/D49264 llvm-svn: 336941
* [libFuzzer] If LLD available, require it to build first.Matt Morehouse2018-07-121-0/+3
| | | | | | | Since we now have a test that requires LLD, make sure it is built before that test runs. llvm-svn: 336932
* [libFuzzer] Use lld-available for gc-sections.test.Matt Morehouse2018-07-121-2/+2
| | | | | | | The lld feature is never available for libFuzzer tests, so gc-sections.test never actually runs. llvm-svn: 336926
* [FileCheck] Add -allow-deprecated-dag-overlap to another compiler-rt testJoel E. Denny2018-07-111-1/+1
| | | | | | See https://reviews.llvm.org/D47106 for details. llvm-svn: 336859
* [libFuzzer] Disable dataflow.test on AArch64.Matt Morehouse2018-07-101-0/+1
| | | | | | | | | | | | | | | | | | | Summary: After my recent change to allow MSan + libFuzzer, the ExplodeDFSanLabelsTest.cpp test started to overflow the stack with recursive function SetBytesForLabel() on an AArch64 bot. Perhaps that bot has a smaller stack size, or maybe AArch64 has larger stack frames for this particular function. Reviewers: kcc, javed.absar Reviewed By: kcc Subscribers: kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D49150 llvm-svn: 336725
* Revert "[Fuzzer] Afl driver changing iterations handling"Matt Morehouse2018-07-101-9/+2
| | | | | | | | | | | This reverts rL334510 due to breakage of afl_driver's command line interface. Patch By: Jonathan Metzman Differential Revision: https://reviews.llvm.org/D49141 llvm-svn: 336719
* [LibFuzzer] Disable MSan test on Darwin which was added by r336619. The ↵Dan Liew2018-07-102-0/+9
| | | | | | | | | MemorySanitizer is not supported on Darwin currently and so Clang refuses to compile with `-fsanitize=memory`. llvm-svn: 336669
* [libFuzzer] Make -fsanitize=memory,fuzzer work.Matt Morehouse2018-07-094-2/+73
| | | | | | | | | | | This patch allows libFuzzer to fuzz applications instrumented with MSan without recompiling libFuzzer with MSan instrumentation. Fixes https://github.com/google/sanitizers/issues/958. Differential Revision: https://reviews.llvm.org/D48891 llvm-svn: 336619
* Revert "[libFuzzer] Mutation tracking and logging implemented"Matt Morehouse2018-07-091-5/+0
| | | | | | This reverts r336597 due to bot breakage. llvm-svn: 336616
* [libFuzzer] Mutation tracking and logging implementedMatt Morehouse2018-07-091-0/+5
| | | | | | | | | | | | Code now exists to track number of mutations that are used in fuzzing in total and ones that produce new coverage. The stats are currently being dumped to the command line. Patch By: Kode Williams Differntial Revision: https://reviews.llvm.org/D48054 llvm-svn: 336597
* Recommit "[CMake] Run libFuzzer tests with check-all."Yvan Roux2018-07-061-2/+0
| | | | | | Since problematic tests on AArch64 were disabled at r336446. llvm-svn: 336449
* [libFuzzer] Disable hanging tests on AArch64Yvan Roux2018-07-063-0/+3
| | | | | | | | | Disable problematic tests which broke AArch64 bots. Details available in Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=38034 Differential Revision: https://reviews.llvm.org/D49011 llvm-svn: 336446
* Revert "[CMake] Run libFuzzer tests with check-all."Yvan Roux2018-07-051-0/+2
| | | | | | | Revert due to AArch64 bots breakage, upstream PR raised to track the issue: https://bugs.llvm.org/show_bug.cgi?id=38034 llvm-svn: 336341
* [libFuzzer] add one more value profile metric, under a flag (experimental)Kostya Serebryany2018-07-032-1/+9
| | | | llvm-svn: 336234
* [libFuzzer] add a tiny and surprisingly hard puzzleKostya Serebryany2018-07-031-0/+14
| | | | llvm-svn: 336229
* Support for multiarch runtimes layoutPetr Hosek2018-06-282-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [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
* [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
* [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] Unify and generalize Apple platforms in CMake and lit test configsKuba Mracek2018-06-203-7/+6
| | | | | | | | 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
* [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
* [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
* [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
OpenPOWER on IntegriCloud