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

Max Moroz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 27 14:28:06 PDT 2018


Dor1s added inline comments.


================
Comment at: lib/fuzzer/FuzzerLoop.cpp:496
 
-  if (Options.HandleUnstable || Options.PrintUnstableStats) {
+  if ((int)Options.HandleUnstable || Options.PrintUnstableStats) {
     TPC.CollectFeatures([&](size_t Feature) {
----------------
morehouse wrote:
> Dor1s wrote:
> > morehouse wrote:
> > > These casts are quite awkward.   Maybe we should just keep `Options.HandleUnstable` as an int.
> > I sort of insisted on not using an int in there, but final decision would yours :)
> Similar libFuzzer options all use int, so at least for consistency I think we should use an int.
> 
> I would prefer to get @kcc's opinion in a separate refactoring patch if you would like to switch from ints to enums.
Yeah... but there isn't any other option that selects different modes. All of them are either boolean flags, integer values, or a close_fd_mask thing. Either way, I hope we'll choose the best strategy and delete the others in the upcoming weeks, so this option will become a boolean flag after all.


https://reviews.llvm.org/D49578





More information about the llvm-commits mailing list