[PATCH] D49578: [libFuzzer] Handle unstable edges by poisoning unstable edges

Matt Morehouse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 27 12:21:56 PDT 2018


morehouse added a comment.

The current flag description still doesn't tell the whole story.

If we detect a new input has unstable edges, we're adding the unstable edges to the corpus features even if we don't add the input itself.  This means any time an edge is found to be unstable, we completely ignore that edge forever.  Even if a later input exercises the edge stably, we will not consider that edge again.

Is this intentional, or a bug in the implementation?



================
Comment at: lib/fuzzer/FuzzerLoop.cpp:496
 
-  if (Options.HandleUnstable || Options.PrintUnstableStats) {
+  if ((int)Options.HandleUnstable || Options.PrintUnstableStats) {
     TPC.CollectFeatures([&](size_t Feature) {
----------------
These casts are quite awkward.   Maybe we should just keep `Options.HandleUnstable` as an int.


================
Comment at: lib/fuzzer/FuzzerOptions.h:23
+  Poison = 3,
+  End = 4,
+};
----------------
I don't really like these `Start` and `End` values, especially since 0 should probably be `Disabled`.


https://reviews.llvm.org/D49578





More information about the llvm-commits mailing list