llvm-project/compiler-rt/include/sanitizer
Kostya Serebryany be5e0ed919 [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
..
allocator_interface.h Generalize sanitizer allocator public interface. 2014-07-07 17:39:31 +00:00
asan_interface.h [asan] introduce __sanitizer_set_death_callback, deprecate __asan_set_death_callback 2014-12-15 23:02:57 +00:00
common_interface_defs.h [sanitizer] move the coverage interface into a separate header, <sanitizer/coverage_interface.h>. NFC, except for the header name change. This may break existing users, but in this case it's better this way (not too many users so far) 2015-02-03 19:40:53 +00:00
coverage_interface.h [sanitizer/coverage] Add AFL-style coverage counters (search heuristic for fuzzing). 2015-03-03 23:27:02 +00:00
dfsan_interface.h [DFSan] Add flag to dump the labels when the program terminates. 2014-11-20 10:01:08 +00:00
linux_syscall_hooks.h tsan: fix linux syscall hooks 2013-10-23 08:40:19 +00:00
lsan_interface.h [lsan] remove LeakSanitizerIsTurnedOffForTheCurrentProcess (this was a bad idea), leave __lsan_is_turned_off 2014-01-15 08:04:21 +00:00
msan_interface.h [msan] Fix MsanTest to pass in track_origins=2 mode. 2015-02-26 15:19:33 +00:00
tsan_interface_atomic.h [TSan] Move declarations of __tsan_atomic functions to a public header 2013-12-11 08:18:50 +00:00