1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/lib/Fuzzer/test
Kostya Serebryany 285f1f0e41 [sanitizer/coverage] Add AFL-style coverage counters (search heuristic for 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
2015-03-03 23:27:02 +00:00
..
unit [fuzzer] Add a gtest-style test 2015-01-30 23:26:57 +00:00
CMakeLists.txt [sanitizer/coverage] Add AFL-style coverage counters (search heuristic for fuzzing). 2015-03-03 23:27:02 +00:00
CounterTest.cpp [sanitizer/coverage] Add AFL-style coverage counters (search heuristic for fuzzing). 2015-03-03 23:27:02 +00:00
FourIndependentBranchesTest.cpp [fuzzer] one more experimental search mode: -use_coverage_pairs=1 2015-02-20 03:02:37 +00:00
FullCoverageSetTest.cpp [fuzzer] add -use_full_coverage_set=1 which solves FullCoverageSetTest. This does not scale very well yet, but might be a good start. 2015-01-29 23:01:07 +00:00
fuzzer.test [sanitizer/coverage] Add AFL-style coverage counters (search heuristic for fuzzing). 2015-03-03 23:27:02 +00:00
FuzzerUnittest.cpp [fuzzer] Add a gtest-style test 2015-01-30 23:26:57 +00:00
InfiniteTest.cpp [fuzzer] minor cleanup based on reviews: remove redundant includes, fix a copy-pasto in tests 2015-01-29 17:16:23 +00:00
lit.cfg [fuzzer] Add proper dependensices to the fuzzer tests 2015-02-03 21:57:32 +00:00
lit.site.cfg.in [fuzzer] Add proper dependensices to the fuzzer tests 2015-02-03 21:57:32 +00:00
NullDerefTest.cpp Reverting r227452, which adds back the fuzzer library. Now excluding the fuzzer library based on LLVM_USE_SANITIZE_COVERAGE being set or unset. 2015-01-29 16:58:29 +00:00
SimpleTest.cpp Reverting r227452, which adds back the fuzzer library. Now excluding the fuzzer library based on LLVM_USE_SANITIZE_COVERAGE being set or unset. 2015-01-29 16:58:29 +00:00
TimeoutTest.cpp [fuzzer] minor cleanup based on reviews: remove redundant includes, fix a copy-pasto in tests 2015-01-29 17:16:23 +00:00