llvm-6502/lib
Kostya Serebryany ae0620c4e9 [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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231166 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 23:27:02 +00:00
..
Analysis Remove getDataLayout() from Instruction/GlobalValue/BasicBlock/Function 2015-03-03 22:01:13 +00:00
AsmParser Revert "Remove the explicit SDNodeIterator::operator= in favor of the implicit default" 2015-03-03 21:18:16 +00:00
Bitcode Add missing includes. make_unique proliferated everywhere. 2015-03-01 21:28:53 +00:00
CodeGen WinEH: Remove vestigial EH object 2015-03-03 23:20:30 +00:00
DebugInfo [llvm-pdbdump] Many minor fixes and improvements 2015-03-02 04:39:56 +00:00
ExecutionEngine Add missing includes. make_unique proliferated everywhere. 2015-03-01 21:28:53 +00:00
Fuzzer [sanitizer/coverage] Add AFL-style coverage counters (search heuristic for fuzzing). 2015-03-03 23:27:02 +00:00
IR Remove getDataLayout() from Instruction/GlobalValue/BasicBlock/Function 2015-03-03 22:01:13 +00:00
IRReader Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
LineEditor Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
Linker Restore LLVMLinkModules C API until it is properly deprecated. 2015-03-02 18:59:38 +00:00
LTO [LTO API] fix memory leakage introduced at r230290. 2015-02-25 21:20:53 +00:00
MC Remove useless .debug_macinfo section setup. 2015-03-02 19:52:42 +00:00
Object Use read{16,32,64}{le,be}() instead of *reinterpret_cast<u{little,big}{16,32,64}_t>(). 2015-03-02 21:19:12 +00:00
Option Remove explicit no-op dtor in favor of the implicit dtor so as not to disable/deprecate the copy operations. 2015-03-03 19:53:02 +00:00
ProfileData Add missing includes. make_unique proliferated everywhere. 2015-03-01 21:28:53 +00:00
Support Make Triple::getOSVersion make sense for Android. 2015-03-03 18:23:51 +00:00
TableGen Add missing includes. make_unique proliferated everywhere. 2015-03-01 21:28:53 +00:00
Target Remove subtarget dependence in pass pipeline setup for AArch64. 2015-03-03 23:22:40 +00:00
Transforms [sanitizer/coverage] Add AFL-style coverage counters (search heuristic for fuzzing). 2015-03-03 23:27:02 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile Move DebugInfo to DebugInfo/DWARF. 2015-01-30 18:07:45 +00:00