summaryrefslogtreecommitdiff
path: root/lib/fuzzer/FuzzerDriver.cpp
diff options
context:
space:
mode:
authorMax Moroz <mmoroz@chromium.org>2018-07-24 21:02:44 +0000
committerMax Moroz <mmoroz@chromium.org>2018-07-24 21:02:44 +0000
commitfa62ba885ab875c88a226403d4ea0ffabcd2a7e6 (patch)
tree7179a0387fb747d59bab75f6a8994e04886bc389 /lib/fuzzer/FuzzerDriver.cpp
parent3ac94fe6137e5d5123b064b03084ea7a0bd0f5ff (diff)
downloadcompiler-rt-fa62ba885ab875c88a226403d4ea0ffabcd2a7e6.tar.gz
[libFuzzer] Handle unstable edges by disregarding unstable edges
Summary: Added a new mode within flag -handle_unstable for new unstable handling algorithm that does the following: When an edge is shown as unstable, copy to UnstableCounters the value 0. During ApplyUnstableCounters we copy back the value 0 to ModuleInline8bitCounters if the edge was unstable. This way we would be ignoring completely features that were collected through non-determinism. Unstable hits would be counted as if it never hit. Reviewers: metzman, Dor1s, kcc, morehouse Reviewed By: metzman, morehouse Subscribers: delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D49684 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337853 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/fuzzer/FuzzerDriver.cpp')
-rw-r--r--lib/fuzzer/FuzzerDriver.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/fuzzer/FuzzerDriver.cpp b/lib/fuzzer/FuzzerDriver.cpp
index 4f40d6abf..783474a39 100644
--- a/lib/fuzzer/FuzzerDriver.cpp
+++ b/lib/fuzzer/FuzzerDriver.cpp
@@ -619,7 +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)
+ if (Flags.handle_unstable == TracePC::MinUnstable ||
+ Flags.handle_unstable == TracePC::ZeroUnstable)
Options.HandleUnstable = Flags.handle_unstable;
Options.DumpCoverage = Flags.dump_coverage;
if (Flags.exit_on_src_pos)