diff options
author | Max Moroz <mmoroz@chromium.org> | 2018-07-23 14:20:52 +0000 |
---|---|---|
committer | Max Moroz <mmoroz@chromium.org> | 2018-07-23 14:20:52 +0000 |
commit | ea5478cd34b2c48e5d75b468578744dd397a0f99 (patch) | |
tree | ab77c494fb875b77abb4913254964ef355450770 /lib/fuzzer/FuzzerDriver.cpp | |
parent | 9e45fcd250e8f1acddba63f2d2bd90a353ad7d1c (diff) | |
download | compiler-rt-ea5478cd34b2c48e5d75b468578744dd397a0f99.tar.gz |
[libFuzzer] Handle unstable edges by using minimum hit counts
Summary:
Created unstable_handle flag that takes 1 or 2, depending on the handling type.
Modified RunOne to accommodate the following heuristic:
Use the first CollectFeatures to count how many features there are.
If no new features, CollectFeatures like before.
If there is new feature, we run CB 2 more times,
Check which edges are unstable per input and we store the least amount of hit counts for each edge.
Apply these hit counts back to inline8bitcounters so that CollectFeatures can work as intended.
Modified UnstableCounters to 8int_t and created a bitset UnstableSet to tell which edges are unstable.
Patch by Kyungtak Woo (@kevinwkt).
Reviewers: Dor1s, metzman, morehouse
Reviewed By: Dor1s, morehouse
Subscribers: delcypher, #sanitizers, llvm-commits, kcc
Differential Revision: https://reviews.llvm.org/D49525
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337696 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/fuzzer/FuzzerDriver.cpp')
-rw-r--r-- | lib/fuzzer/FuzzerDriver.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/fuzzer/FuzzerDriver.cpp b/lib/fuzzer/FuzzerDriver.cpp index eb849fcd0..4f40d6abf 100644 --- a/lib/fuzzer/FuzzerDriver.cpp +++ b/lib/fuzzer/FuzzerDriver.cpp @@ -619,6 +619,8 @@ int FuzzerDriver(int *argc, char ***argv, UserCallback Callback) { Options.PrintCorpusStats = Flags.print_corpus_stats; Options.PrintCoverage = Flags.print_coverage; Options.PrintUnstableStats = Flags.print_unstable_stats; + if (Flags.handle_unstable) + Options.HandleUnstable = Flags.handle_unstable; Options.DumpCoverage = Flags.dump_coverage; if (Flags.exit_on_src_pos) Options.ExitOnSrcPos = Flags.exit_on_src_pos; |