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

Matt Morehouse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 26 09:42:52 PDT 2018


morehouse added a comment.

So this is basically the `ZeroUnstable` mode with one less pass over the counters?



================
Comment at: lib/fuzzer/FuzzerDriver.cpp:627
+    Options.HandleUnstable =
+        static_cast<HandleUnstableOptions>(Flags.handle_unstable);
   Options.DumpCoverage = Flags.dump_coverage;
----------------
This cast looks odd since we're comparing int to enum without a cast right before this.  Probably just do implicit cast.


================
Comment at: lib/fuzzer/FuzzerFlags.def:120
+                   " feature collection."
+                   " If 3, we only take into account the hit counts if a new"
+                   " stable edge is found.")
----------------
Dor1s wrote:
> Frankly, I don't understand this explanation... The problem might be on my side though, let's see what Matt thinks.
This confuses me too.


================
Comment at: lib/fuzzer/FuzzerOptions.h:23
+  PoisonUnstable = 3,
+};
+
----------------
Might be cleaner to do something like
```
enum class UnstableMode {
  Disabled = 0,
  Min = 1,
  Zero = 2,
  Poison = 3,
};
```


https://reviews.llvm.org/D49578





More information about the llvm-commits mailing list