[PATCH] D48054: [libFuzzer] Mutation tracking and logging implemented

Jonathan Metzman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 22 16:23:50 PDT 2018


metzman added a comment.

It looks like the line numbers on my last comments were messed up, trying again.



================
Comment at: lib/fuzzer/FuzzerMutationStats.cpp:29
+    Printf("%.3f", CurrentRatio);
+    if (i < NUMBER_OF_MUTATION_TYPES-1) Printf(",");
+    else if (i == NUMBER_OF_MUTATION_TYPES-1) Printf("\n\n");
----------------
metzman wrote:
> I think every arithmetic operator in libFuzzer has spaces around it. Please do that here by adding spaces around the "-"
I messed up with this comment please ignore


================
Comment at: lib/fuzzer/FuzzerMutationStats.cpp:30
+    if (i < NUMBER_OF_MUTATION_TYPES-1) Printf(",");
+    else if (i == NUMBER_OF_MUTATION_TYPES-1) Printf("\n\n");
+  }
----------------
metzman wrote:
> metzman wrote:
> > This `if` isn't needed. `else` is enough.
> > Please remove it
> This `if` isn't needed, `else` is enough
I messed up with this comment please ignore


================
Comment at: lib/fuzzer/FuzzerMutationStats.cpp:26
+    Printf("%.3f", Ratio);
+    if (i < NUMBER_OF_MUTATION_TYPES-1) Printf(",");
+    else if (i == NUMBER_OF_MUTATION_TYPES-1) Printf("\n\n");
----------------
I think every arithmetic operator in libFuzzer has spaces around it. Please do that here by adding spaces around the "-"


================
Comment at: lib/fuzzer/FuzzerMutationStats.cpp:27
+    if (i < NUMBER_OF_MUTATION_TYPES-1) Printf(",");
+    else if (i == NUMBER_OF_MUTATION_TYPES-1) Printf("\n\n");
+  }
----------------
This if isn't needed. else is enough.
Please remove it


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D48054





More information about the llvm-commits mailing list