[PATCH] D49621: [libFuzzer] Initial implementation of weighted mutation leveraging during runtime.

Matt Morehouse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 2 10:53:46 PDT 2018


morehouse added inline comments.


================
Comment at: lib/fuzzer/FuzzerMutate.cpp:602
+  if (!SumOfStats) return;
+  Distribution = std::discrete_distribution<size_t>(Stats.begin(), Stats.end());
+}
----------------
Does `Distribution.param(Stats)` work instead?


================
Comment at: lib/fuzzer/FuzzerMutate.h:104
+  /// Refreshes current mutation stats recalculated to include mutation
+  /// usefulness from the last 10,000 runs.
+  void UpdateMutationStats();
----------------
There's nothing inside `UpdateMutationStats` that refers to the number 10,000.

Maybe something like "Recalculates mutation stats based on latest run data."


================
Comment at: test/fuzzer/fuzzer-weightedmutations.test:6
+
+CHECK: BINGO
----------------
This really only tests that there's no major regression with the flag on.   If this flag performs better under some circumstances, we should add a test to demonstrate that.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D49621





More information about the llvm-commits mailing list