diff options
author | Max Moroz <mmoroz@chromium.org> | 2018-07-24 21:02:44 +0000 |
---|---|---|
committer | Max Moroz <mmoroz@chromium.org> | 2018-07-24 21:02:44 +0000 |
commit | 8db0befc6d34c6db33ce8210faccdb5da6c2f670 (patch) | |
tree | 31bd8a4349b696ee33784e19d71f7171b1410b20 /compiler-rt/lib/fuzzer/FuzzerLoop.cpp | |
parent | 86d6320b94be365a2fbc2a0756aa568587ac4d71 (diff) | |
download | bcm5719-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/FuzzerLoop.cpp')
-rw-r--r-- | compiler-rt/lib/fuzzer/FuzzerLoop.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler-rt/lib/fuzzer/FuzzerLoop.cpp b/compiler-rt/lib/fuzzer/FuzzerLoop.cpp index e63ee7361c5..4bc88365a0b 100644 --- a/compiler-rt/lib/fuzzer/FuzzerLoop.cpp +++ b/compiler-rt/lib/fuzzer/FuzzerLoop.cpp @@ -472,7 +472,8 @@ void Fuzzer::CheckForUnstableCounters(const uint8_t *Data, size_t Size) { TPC.UpdateUnstableCounters(Options.HandleUnstable); // Move minimum hit counts back to ModuleInline8bitCounters - if (Options.HandleUnstable) + if (Options.HandleUnstable == TracePC::MinUnstable || + Options.HandleUnstable == TracePC::ZeroUnstable) TPC.ApplyUnstableCounters(); } |