[PATCH] D49621: [libFuzzer] Initial implementation of weighted mutation leveraging during runtime.
Jonathan Metzman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 23 08:07:35 PDT 2018
metzman added inline comments.
================
Comment at: lib/fuzzer/FuzzerMutate.cpp:606
+ if (Stats[i] == 0) MutationWeights[i] = 1;
+ // 1000 due to 3 decimal places
+ else
----------------
metzman wrote:
> I think the placement of this comment is awkward. Maybe put on the same line as `else`.
I'm also unsure what three decimal places this comment is referring to. We don't round anywhere here do we?
================
Comment at: lib/fuzzer/FuzzerMutate.cpp:622
+ else
+ RandomMark -= MutationWeights[i];
+ }
----------------
metzman wrote:
> Is the purpose of this to ensure that we return an index on the last iteration?
> I need to think about this technique more but I am not sure it is fair (ie: things with equal weight have equal chance of being picked).
Actually I think it is fair. But let's have a comment explaining how this technique works.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D49621
More information about the llvm-commits
mailing list