summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/FuzzerInternal.h
Commit message (Collapse)AuthorAgeFilesLines
...
* [libFuzzer] add -only_ascii flagKostya Serebryany2015-08-111-1/+6
| | | | llvm-svn: 244559
* Add missing include guard to FuzzerInternal.h, NFC.Yaron Keren2015-08-101-0/+6
| | | | llvm-svn: 244457
* [libFuzzer] move the mutators to public interface so that custom mutators ↵Kostya Serebryany2015-08-061-17/+0
| | | | | | may reuse these functions directly llvm-svn: 244250
* [libFuzzer] add one more mutation strategy: byte shufflingKostya Serebryany2015-08-061-0/+2
| | | | llvm-svn: 244188
* [libFuzzer] add option -report_slow_units=Nsec to control when slow units ↵Kostya Serebryany2015-08-051-0/+1
| | | | | | are printed llvm-svn: 244152
* [libFuzzer] more refactoring of the Mutator and adding tests to itKostya Serebryany2015-08-011-1/+7
| | | | llvm-svn: 243818
* [libFuzzer] start refactoring the Mutator and adding tests to itKostya Serebryany2015-08-011-0/+2
| | | | llvm-svn: 243817
* [libFuzzer] allow users to supply their own implementation of randKostya Serebryany2015-07-241-3/+6
| | | | llvm-svn: 243078
* [libFuzzer] dump long running units to disk Kostya Serebryany2015-07-231-1/+1
| | | | llvm-svn: 243031
* [lib/Fuzzer] start getting rid of std::cerr. Sadly, these parts of C++ ↵Kostya Serebryany2015-05-231-0/+1
| | | | | | library used in libFuzzer badly interract with the same code used in the target function and also with dfsan. It's easier to just not use std::cerr than to defeat these issues. llvm-svn: 238078
* [lib/Fuzzer] remove -use_coverage_pairs=1, an experimental feature that is ↵Kostya Serebryany2015-05-221-2/+0
| | | | | | unlikely to ever scale llvm-svn: 238063
* [lib/Fuzzer] extend the fuzzer interface to allow user-supplied mutatorsKostya Serebryany2015-05-221-4/+16
| | | | llvm-svn: 238059
* [lib/Fuzzer] change the meaning of -timeout flag: now timeout is applied to ↵Kostya Serebryany2015-05-191-0/+1
| | | | | | every unit of work separately llvm-svn: 237735
* [lib/Fuzzer] more efficient reload logic; also don't spam git too muchKostya Serebryany2015-05-191-2/+1
| | | | llvm-svn: 237649
* [lib/Fuzzer] when -sync_command=<CMD> is given, periodically execute 'CMD ↵Kostya Serebryany2015-05-181-0/+6
| | | | | | CORPUS' to synchronize with other processes llvm-svn: 237617
* [lib/Fuzzer] Add SHA1 implementation from public domain.Kostya Serebryany2015-05-141-0/+5
| | | | | | | | | | | | | | | | | | | | | | | Summary: This adds a SHA1 implementation taken from public domain code. The change is trivial, but as it involves third-party code I'd like a second pair of eyes before commit. LibFuzzer can not use SHA1 from openssl because openssl may not be available and because we may be fuzzing openssl itself. Using sha1sum via a pipe is too slow. Test Plan: n/a Reviewers: chandlerc Reviewed By: chandlerc Subscribers: majnemer, llvm-commits Differential Revision: http://reviews.llvm.org/D9733 llvm-svn: 237400
* [lib/Fuzzer] guess the right number of workers if -jobs=N is given but ↵Kostya Serebryany2015-05-121-0/+2
| | | | | | -workers=M is not. Update the docs. llvm-svn: 237163
* [lib/Fuzzer] remove the -dfsan=1 flag, just use -use_traces=1 (w/ or w/o dfsan)Kostya Serebryany2015-05-121-1/+0
| | | | llvm-svn: 237083
* [lib/Fuzzer] rename FuzzerDFSan.cpp to FuzzerTraceState.cpp; update ↵Kostya Serebryany2015-05-111-1/+1
| | | | | | comments. NFC expected llvm-svn: 237050
* [lib/Fuzzer] add a trace-based mutatation logic. Same idea as with ↵Kostya Serebryany2015-05-111-0/+1
| | | | | | DFSan-based mutator, but instead of relying on taint tracking, try to find the data directly in the input. More (logic and comments) to go. llvm-svn: 237043
* [lib/Fuzzer] use -fsanitize-coverage=trace-cmp when building LLVM with ↵Kostya Serebryany2015-05-081-3/+9
| | | | | | LLVM_USE_SANITIZE_COVERAGE; in lib/Fuzzer try to reload the corpus to pick up new units from other processes llvm-svn: 236906
* [lib/Fuzzer] change the way we use taint information for fuzzing. Now, we ↵Kostya Serebryany2015-05-071-1/+11
| | | | | | run a single unit and collect suggested mutations based on tracing+taint data, then apply the suggested mutations one by one. The previous scheme was slower and more complex. llvm-svn: 236772
* [lib/Fuzzer] minor refactoring/simplification, NFCKostya Serebryany2015-05-071-2/+4
| | | | llvm-svn: 236757
* [lib/Fuzzer] on crash print the contents of the crashy input as base64Kostya Serebryany2015-05-051-0/+1
| | | | llvm-svn: 236548
* [fuzzer] Add support for token-based fuzzing (e.g. for C++). Allow string ↵Kostya Serebryany2015-03-311-11/+15
| | | | | | flags. llvm-svn: 233745
* [fuzzer] when a single unit takes over 1 second to run and it is the slowest ↵Kostya Serebryany2015-03-301-0/+1
| | | | | | one so far, print it. llvm-svn: 233637
* [fuzzer] print various stats in a unified wayKostya Serebryany2015-03-301-0/+1
| | | | llvm-svn: 233624
* DFSan-based fuzzer (proof of concept).Kostya Serebryany2015-03-301-0/+4
| | | | | | | | | | | | | | | | | | Summary: This adds a simple DFSan-based (i.e. taint-guided) fuzzer mutator, see the comments for details. Test Plan: a test added Reviewers: samsonov, pcc Reviewed By: samsonov, pcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8669 llvm-svn: 233613
* [sanitizer/coverage] Add AFL-style coverage counters (search heuristic for ↵Kostya Serebryany2015-03-031-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | fuzzing). Introduce -mllvm -sanitizer-coverage-8bit-counters=1 which adds imprecise thread-unfriendly 8-bit coverage counters. The run-time library maps these 8-bit counters to 8-bit bitsets in the same way AFL (http://lcamtuf.coredump.cx/afl/technical_details.txt) does: counter values are divided into 8 ranges and based on the counter value one of the bits in the bitset is set. The AFL ranges are used here: 1, 2, 3, 4-7, 8-15, 16-31, 32-127, 128+. These counters provide a search heuristic for single-threaded coverage-guided fuzzers, we do not expect them to be useful for other purposes. Depending on the value of -fsanitize-coverage=[123] flag, these counters will be added to the function entry blocks (=1), every basic block (=2), or every edge (=3). Use these counters as an optional search heuristic in the Fuzzer library. Add a test where this heuristic is critical. llvm-svn: 231166
* [fuzzer] one more experimental search mode: -use_coverage_pairs=1 Kostya Serebryany2015-02-201-0/+3
| | | | llvm-svn: 229957
* [fuzzer] split main() into FuzzerDriver() that takes a callback as a ↵Kostya Serebryany2015-02-191-1/+5
| | | | | | parameter and a tiny main() in a separate file llvm-svn: 229882
* [fuzzer] add flag prefer_small_during_initial_shuffle, be a bit more verboseKostya Serebryany2015-02-041-0/+8
| | | | llvm-svn: 228235
* [fuzzer] add -runs=N to limit the number of runs per session. Also, make ↵Kostya Serebryany2015-02-041-0/+2
| | | | | | sure we do some mutations w/o cross over. llvm-svn: 228214
* [fuzzer] make multi-process execution more verbose; fix mutation to actually ↵Kostya Serebryany2015-02-041-1/+2
| | | | | | respect mutation depth and to never produce empty units llvm-svn: 228170
* [fuzzer] add -use_full_coverage_set=1 which solves FullCoverageSetTest. This ↵Kostya Serebryany2015-01-291-0/+5
| | | | | | does not scale very well yet, but might be a good start. llvm-svn: 227507
* Reverting r227452, which adds back the fuzzer library. Now excluding the ↵Aaron Ballman2015-01-291-0/+81
| | | | | | fuzzer library based on LLVM_USE_SANITIZE_COVERAGE being set or unset. llvm-svn: 227464
* Temporarily reverting the fuzzer library as it causes too many build issues ↵Aaron Ballman2015-01-291-81/+0
| | | | | | for MSVC users. This reverts: 227445, 227395, 227389, 227357, 227254, 227252 llvm-svn: 227452
* [fuzzer] add option -save_minimized_corpusKostya Serebryany2015-01-281-1/+5
| | | | llvm-svn: 227395
* Add a Fuzzer libraryKostya Serebryany2015-01-271-0/+77
Summary: A simple genetic in-process coverage-guided fuzz testing library. I've used this fuzzer to test clang-format (it found 12+ bugs, thanks djasper@ for the fixes!) and it may also help us test other parts of LLVM. So why not keep it in the LLVM repository? I plan to add the cmake build rules later (in a separate patch, if that's ok) and also add a clang-format-fuzzer target. See README.txt for details. Test Plan: Tests will follow separately. Reviewers: djasper, chandlerc, rnk Reviewed By: rnk Subscribers: majnemer, ygribov, dblaikie, llvm-commits Differential Revision: http://reviews.llvm.org/D7184 llvm-svn: 227252
OpenPOWER on IntegriCloud