summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/fuzzer
Commit message (Collapse)AuthorAgeFilesLines
* [libFuzzer] fix the unit testsKostya Serebryany2019-02-153-12/+14
| | | | llvm-svn: 354088
* [libFuzzer] when doing the merge, keep track of the coveraged edges, not ↵Kostya Serebryany2019-02-154-25/+33
| | | | | | just features llvm-svn: 354087
* [libFuzzer] when doing the merge, keep track of the coveraged edges, not ↵Kostya Serebryany2019-02-146-51/+82
| | | | | | just features llvm-svn: 354076
* [libFuzzer] better stats for the fork modeKostya Serebryany2019-02-141-5/+44
| | | | llvm-svn: 354061
* [libFuzzer] trying to fix the bot (can't reproduce the build failure locally)Kostya Serebryany2019-02-141-1/+2
| | | | llvm-svn: 354000
* [libFuzzer] add threads to the fork mode: now you can pass -fork=N to run N ↵Kostya Serebryany2019-02-143-90/+147
| | | | | | concurrent workers. Fork mode is still work-in-progress. llvm-svn: 353997
* [libFuzzer] a bit of refactoring of the fork modeKostya Serebryany2019-02-136-74/+153
| | | | llvm-svn: 353910
* [libFuzzer] move the implementation of the fork mode into a separate fileKostya Serebryany2019-02-126-93/+165
| | | | llvm-svn: 353891
* [libFuzzer] make the fork mode less verboseKostya Serebryany2019-02-125-28/+52
| | | | llvm-svn: 353794
* [libFuzzer] teach the fork mode to ignore OOMs and timeoutsKostya Serebryany2019-02-124-6/+12
| | | | llvm-svn: 353792
* [libFuzzer] replace slow std::mt19937 with a much faster std::minstd_rand; ↵Kostya Serebryany2019-02-122-4/+5
| | | | | | second attempt after failed r352732, this time with a fix for cmake llvm-svn: 353782
* [libFuzzer] simplify the code for print_coverage=1 so that it doesn't fail ↵Kostya Serebryany2019-02-121-2/+2
| | | | | | on broken debug info llvm-svn: 353781
* [libFuzzer] extend the -fork=1 functionality. Still not fully usable, but ↵Kostya Serebryany2019-02-1211-35/+108
| | | | | | good enough for the first unit test llvm-svn: 353775
* [Fuzzer] Fix function prototype in fuzzer::ExternalFunctions. [NFC]David L. Jones2019-02-091-1/+1
| | | | | | | | | | | | | | The __sanitizer_acquire_crash_state function has int return type, but the fuzzer's external function definitions give it bool. Places where __sanitizer_acquire_crash_state is declared: include/sanitizer_common/sanitizer_interface_defs.h lib/sanitizer_common/sanitizer_interface_internal.h lib/sanitizer_common/sanitizer_common.cc lib/fuzzer/FuzzerExtFunctions.def (this is the only bool) llvm-svn: 353596
* [libFuzzer] more refactoring; change some of the exit codes (timeout, OOM, ↵Kostya Serebryany2019-02-096-39/+57
| | | | | | interrupt) so that the parent process can distinguish those llvm-svn: 353584
* [libFuzzer] refactor the merging code, NFCKostya Serebryany2019-02-083-37/+52
| | | | llvm-svn: 353576
* [libFuzzer] remove two unused experimental flagsKostya Serebryany2019-02-085-64/+4
| | | | llvm-svn: 353573
* [libFuzzer] introduce an experimental mode -fork=1, where fuzzing happens in ↵Kostya Serebryany2019-02-087-52/+89
| | | | | | a subprocess (still running multiple inputs per process), thus making the fuzzing more resilient to timeouts and OOMs. This is just a skeleton of the code, and some associated refactoring, not a fully working feature yet. llvm-svn: 353570
* [libFuzzer] refactor the way we choose the element to cross-over with, NFC ↵Kostya Serebryany2019-02-086-19/+43
| | | | | | (expected1); add a flag -seed_inputs= to pass extra seed inputs as file paths, not dirs llvm-svn: 353494
* [libFuzzer][Windows] Clean up RawPrintJonathan Metzman2019-02-041-2/+1
| | | | | | | | | | | | | | | | Summary: Use `_write` instead of the deprecated alias `write` on Windows. Also, remove comment saying RawPrint is untested on Windows. Reviewers: vitalybuka Reviewed By: vitalybuka Subscribers: vitalybuka Differential Revision: https://reviews.llvm.org/D57589 llvm-svn: 353108
* [fuzzer] Use RawPrint instead of Printf for instrumentation warningJonathan Metzman2019-01-312-7/+11
| | | | | | | | | | | | | | | Summary: Use RawPrint instead of Printf for instrumentation warning because Printf doesn't work on Win when instrumentation is being initialized (since OutputFile is not yet initialized). Reviewers: kcc Reviewed By: kcc Differential Revision: https://reviews.llvm.org/D57531 llvm-svn: 352789
* Revert r352732: [libFuzzer] replace slow std::mt19937 with a much faster ↵Jeremy Morse2019-01-311-3/+3
| | | | | | | | | | std::minstd_rand This causes a failure on the following bot as well as our internal ones: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fuzzer/builds/23103 llvm-svn: 352747
* [libFuzzer] replace slow std::mt19937 with a much faster std::minstd_randKostya Serebryany2019-01-311-3/+3
| | | | llvm-svn: 352732
* [libFuzzer] set libFuzzer's own SEGV handler even one is already present, ↵Kostya Serebryany2019-01-314-13/+18
| | | | | | but call that handler from ours (unless we are unprotecting lazy counters). Call ProtectLazyCounters later, so that it runs after the initialization code in the target. llvm-svn: 352713
* [libFuzzer] Set default sanitizer options in fuzzer testsJulian Lettner2019-01-311-2/+3
| | | | | | | | | | | | | | | | | | | | | Summary: Set default `ASAN_OPTIONS` when running libFuzzer tests. This allows us to remove special casing in code for Darwin where we usually pass `abort_on_error=0` to override platform defaults for tests. A previous commit changed the code to make the tests pass: https://github.com/llvm/llvm-project/commit/7764a04af007eca68eafcf5caaea560ed05e35a9 Adapted a few tests to use `%env_asan_opts=` instead of directly setting the environment variable. rdar://problem/47515276 Reviewers: kcc, george.karpenkov Differential Revision: https://reviews.llvm.org/D57465 llvm-svn: 352711
* [libFuzzer] experimental performance optimization -lazy_counters, off by ↵Kostya Serebryany2019-01-3111-1/+78
| | | | | | default. Posix-only for now, tested on Linux llvm-svn: 352700
* [libFuzzer] remove stale code, NFCKostya Serebryany2019-01-309-346/+0
| | | | llvm-svn: 352604
* [libFuzzer] refactor the handling of instrumentation counters so that they ↵Kostya Serebryany2019-01-303-47/+107
| | | | | | are grouped in regions one full page each. Needed for future optimization. NFC llvm-svn: 352603
* [libFuzzer] remove stale code Kostya Serebryany2019-01-296-113/+3
| | | | llvm-svn: 352571
* [libFuzzer] revert an accidental commitKostya Serebryany2019-01-291-3/+35
| | | | llvm-svn: 352567
* [libFuzzer] remove deprecated support for -fsanitize-coverage=trace-pc[-guard]Kostya Serebryany2019-01-291-35/+3
| | | | llvm-svn: 352566
* [libFuzzer] remove deprecated support for -fsanitize-coverage=trace-pc[-guard]Kostya Serebryany2019-01-291-9/+12
| | | | llvm-svn: 352564
* [libFuzzer][Windows] Use dllexport for all declarations in FuzzerInterface.hJonathan Metzman2019-01-281-1/+1
| | | | | | | | | | | | | | | | | Summary: Use dllexport for all declarations in FuzzerInterface.h Use it for clang even though clang supports default visibility attribute to prevent a warning from being thrown when LLVMFuzzerMutate is defined with dllexport. This makes `FUZZER_INTERFACE_VISIBILITY` (FuzzerInterface.h) consistent with `ATTRIBUTE_INTERFACE` (FuzzerDefs.h) when using clang on Windows. Reviewers: vitalybuka, morehouse Reviewed By: morehouse Differential Revision: https://reviews.llvm.org/D57305 llvm-svn: 352395
* [fuzzer][afl] Remove AFL_DRIVER_EXTRA_STATS_FILENAMEJonathan Metzman2019-01-281-165/+4
| | | | | | | | | | | | | | Summary: Remove this feature as it is unused, buggy, and not worth correcting since the forkserver makes it difficult. Reviewers: morehouse, jfb Reviewed By: morehouse Differential Revision: https://reviews.llvm.org/D57308 llvm-svn: 352392
* [libFuzzer] print uncovered functions when doing -print_coverage=1Kostya Serebryany2019-01-261-6/+6
| | | | llvm-svn: 352263
* [libFuzzer][MSVC] Disable exceptions in MSVC headersJonathan Metzman2019-01-251-3/+4
| | | | | | | | | | | | | | | | Summary: Disable exceptions in MSVC headers using -D_HAS_EXCEPTIONS=0 to silence compiler warning instead of using /Ehsc. Reviewers: rnk, morehouse, metzman Reviewed By: rnk, morehouse, metzman Subscribers: rnk, morehouse, mgorny Differential Revision: https://reviews.llvm.org/D57119 llvm-svn: 352144
* [libFuzzer] more agressive value profiling and CMP tracing for switch statementsKostya Serebryany2019-01-241-11/+31
| | | | llvm-svn: 352107
* Fix building sanitizers for MinGWMartin Storsjo2019-01-231-1/+1
| | | | | | The /EHsc flag is MSVC specific, not generic to the windows target. llvm-svn: 351927
* [libFuzzer][MSVC] Enable building libFuzzer with MSVCJonathan Metzman2019-01-224-6/+13
| | | | | | | | | | | | | | | Summary: Enable building libFuzzer with MSVC. * Don't try to include <endian.h> in FuzzerSHA1.cpp. MSVC doesn't have this header, and WINDOWS is always little endian (even on ARM) Subscribers: srhines, mgorny, javed.absar, kristof.beyls Differential Revision: https://reviews.llvm.org/D56510 llvm-svn: 351855
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-1954-214/+162
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [libFuzzer][MSVC] Make attribute-use compatible with MSVCJonathan Metzman2019-01-177-24/+46
| | | | | | | | | | | | | | Summary: Replace attributes with macros that use equivalent declspecs for MSVC. Reviewers: vitalybuka Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D56512 llvm-svn: 351456
* [libFuzzer] Remove unstable edge handlingJonathan Metzman2019-01-158-158/+9
| | | | | | | | | | Summary: Remove code for handling unstable edges from libFuzzer since it has not been found useful. Differential Revision: https://reviews.llvm.org/D56730 llvm-svn: 351262
* [libFuzzer][MSVC] Use alternatename for ext functionsJonathan Metzman2019-01-153-57/+84
| | | | | | | | | | | | | | | | | Summary: Use alternatename for external functions only when using MSVC since Clang doesn't support it and MSVC doesn't support Clang's method (weak aliases). Reviewers: morehouse Reviewed By: morehouse Subscribers: rnk, thakis, mgorny Differential Revision: https://reviews.llvm.org/D56514 llvm-svn: 351152
* [libfuzzer][MSVC] Make calls to builtin functions work with MSVCJonathan Metzman2019-01-096-25/+127
| | | | | | | | | | | | | | | | | | Summary: Replace calls to builtin functions with macros or functions that call the Windows-equivalents when targeting windows and call the original builtin functions everywhere else. This change makes more parts of libFuzzer buildable with MSVC. Reviewers: vitalybuka Reviewed By: vitalybuka Subscribers: mgorny, rnk, thakis Differential Revision: https://reviews.llvm.org/D56439 llvm-svn: 350766
* [libFuzzer] make len_control less aggressiveKostya Serebryany2018-12-141-1/+1
| | | | llvm-svn: 349210
* [test] Add missing cmake include for building libFuzzer aloneMichal Gorny2018-12-061-0/+2
| | | | | | | | | | | | | | Include CompilerRTCompile in fuzzer tests explicitly. Otherwise, when building only libFuzzer, CMake fails due to: CMake Error at cmake/Modules/AddCompilerRT.cmake:395 (sanitizer_test_compile): Unknown CMake command "sanitizer_test_compile". Call Stack (most recent call first): lib/fuzzer/tests/CMakeLists.txt:53 (generate_compiler_rt_tests) Differential Revision: https://reviews.llvm.org/D55378 llvm-svn: 348524
* [fuzzer] Read files as binaryJonathan Metzman2018-11-062-3/+3
| | | | | | | | | | | | Summary: Read corpus files as binary to avoid automatic conversions Reviewers: Dor1s, morehouse Reviewed By: Dor1s, morehouse Differential Revision: https://reviews.llvm.org/D54180 llvm-svn: 346279
* Follow Windows' approach for NetBSD in AlarmCallback()Kamil Rytarowski2018-11-061-1/+2
| | | | | | | NetBSD's current behavior needs to ignore check for InFuzzingThread() in Fuzzer::AlarmCallback(). llvm-svn: 346194
* [compiler-rt][Fuzzer] Fix the fuzzer test buildPetr Hosek2018-11-021-2/+2
| | | | | | | | | This fixes the issue introduced in r345765 which changed the way in which the embedded libc++ is being built but omitted tests. Differential Revision: https://reviews.llvm.org/D54058 llvm-svn: 346052
* [compiler-rt][Fuzzer] Use the new C++ ABI namespace CMake supportPetr Hosek2018-10-311-1/+1
| | | | | | | | | libc++ now supports customizing the ABI namespace directly from the CMake build so we no longer need to rely on custom CFLAGS. Differential Revision: https://reviews.llvm.org/D53939 llvm-svn: 345765
OpenPOWER on IntegriCloud