summaryrefslogtreecommitdiffstats
path: root/compiler-rt/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
commit8db0befc6d34c6db33ce8210faccdb5da6c2f670 (patch)
tree31bd8a4349b696ee33784e19d71f7171b1410b20 /compiler-rt/lib/fuzzer/FuzzerDriver.cpp
parent86d6320b94be365a2fbc2a0756aa568587ac4d71 (diff)
downloadbcm5719-llvm-8db0befc6d34c6db33ce8210faccdb5da6c2f670.tar.gz
bcm5719-llvm-8db0befc6d34c6db33ce8210faccdb5da6c2f670.zip
[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 llvm-svn: 337853
Diffstat (limited to 'compiler-rt/lib/fuzzer/FuzzerDriver.cpp')
-rw-r--r--compiler-rt/lib/fuzzer/FuzzerDriver.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler-rt/lib/fuzzer/FuzzerDriver.cpp b/compiler-rt/lib/fuzzer/FuzzerDriver.cpp
index 4f40d6abf63..783474a39e1 100644
--- a/compiler-rt/lib/fuzzer/FuzzerDriver.cpp
+++ b/compiler-rt/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)
OpenPOWER on IntegriCloud