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

Max Moroz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 25 14:08:45 PDT 2018


Dor1s accepted this revision.
Dor1s added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lib/fuzzer/FuzzerMutate.cpp:544
+void MutationDispatcher::CountCurrentMutatorSequence() {
+  for (auto M : CurrentMutatorSequence)
+    // Increment using map look up and enum for index
----------------
nit: for `const auto& M`


================
Comment at: test/fuzzer/fuzzer-mutationstats.test:3
+RUN: not %run %t-MutationStatsTest -max_total_time=360 -print_final_stats=1 -print_mutation_stats=1 -print_mutation_usefulness=1 2>&1 | FileCheck %s
+CHECK: stat::mutation_usefulness: {{.*[0-9]+\.[0-9]+[1-9]+.*}}
----------------
metzman wrote:
> Dor1s wrote:
> > add a comment before that line, something like "# Make sure there are some non-zero values in the usefulness percentages printed."
> Sorry, I think comments in this format begin with `;` not `#`.
> See `afl-driver-stderr.test` as an example.
Not a big deal, but looks like only AFL tests have that syntax, others use `#` for comments (search for `^# file:\.test file:^src/third_party/llvm/compiler-rt/test/fuzzer/` in on the internal CS)


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D48054





More information about the llvm-commits mailing list