[PATCH] D48054: [libFuzzer] Mutation tracking and logging implemented
Kodé Williams via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 27 19:35:14 PDT 2018
kodewilliams marked 6 inline comments as done.
kodewilliams added inline comments.
================
Comment at: lib/fuzzer/FuzzerMutate.cpp:531
CurrentMutatorSequence.push_back(M);
+ TotalMutations.at(M.Identifier)++;
return NewSize;
----------------
kcc wrote:
> instead of having M.Identifier, change the line above
> auto M = Mutators[Rand(Mutators.size())];
> to something like
>
> size_t MutatorIdx = Rand(Mutators.size());
> auto M = Mutators[MutatorIdx];
>
> and then use MutatorIdx
@kcc I had been using the mutation identifier to increment useful counts but now since it is gone, the only way I can think of getting the correct index inside CountCurrentMutatorSequence is by looking up each element in the vector to get it's index then using that, which is expensive. Since this is not done a very large number of times, is it acceptable?
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D48054
More information about the llvm-commits
mailing list