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

Kostya Serebryany via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 26 17:23:22 PDT 2018


kcc added inline comments.


================
Comment at: lib/fuzzer/FuzzerLoop.cpp:667
+      if (Options.PrintMutationStats)
+        MD.CountCurrentMutatorSequence();
       break;  // We will mutate this input more in the next rounds.
----------------
Shouldn't we call this near the call to RecordSuccessfulMutationSequence, or even inside it? 
Also, I think it's find to collect the stats even when printing stats is not requested, 
as soon as the stats collection is cheap. This way will have less code. 


================
Comment at: lib/fuzzer/FuzzerMutate.h:22
 
+enum MutationType {
+  ADD_WORD_FROM_MANUAL_DICTIONARY,
----------------
ouch. please find a way w/o introducing this enum


================
Comment at: lib/fuzzer/FuzzerMutationStats.h:1
+//===- FuzzerMutationStats.h - Header for mutation tracking -----*- C++ -* ===//
+//
----------------
this is a bit over-engineered. 
Just put this into FuzzerMutate.h and please make it simpler. 

I guess it could be two extra Vector<uint64_t> objects inside MutationDispatcher
which you resize in the MutationDispatcher CTOR. 


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D48054





More information about the llvm-commits mailing list