[PATCH] D48054: [libFuzzer] Mutation tracking and logging implemented
Max Moroz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 22 06:43:12 PDT 2018
Dor1s added a comment.
Did you forget to do `git add` for the test file you've written?
================
Comment at: lib/fuzzer/FuzzerMutate.cpp:34
{
- {&MutationDispatcher::Mutate_EraseBytes, EraseBytes, "EraseBytes"},
- {&MutationDispatcher::Mutate_InsertByte, InsertByte, "InsertByte"},
+ {&MutationDispatcher::Mutate_EraseBytes, ERASE_BYTES, "ERASE_BYTES"},
+ {&MutationDispatcher::Mutate_InsertByte, INSERT_BYTE, "INSERT_BYTE"},
----------------
Please use original string names, like the one on line 42, those look better. Plus, we shouldn't change any existing code without a strong reason.
Also, please make sure that every line is no longer than 80 characters. You can do it manually, or use `clang-format` utility for that, it should be in your `build/bin' directory, but be careful, as it can do some unnecessary changes which again we shouldn't do.
================
Comment at: lib/fuzzer/FuzzerMutate.h:27
+ CHANGE_ASCII_INTEGER,
+ CHANGE_BINARY_INTEGER, // To avoid clash with mutation helper function
+ CHANGE_BIT,
----------------
I think we don't need this comment and the one on line 31 anymore, please remove.
================
Comment at: lib/fuzzer/FuzzerMutate.h:38
+ SHUFFLE_BYTES,
+ MAX_NUMBER_OF_MUTATION_TYPES
} MutationType;
----------------
just call it `NUMBER_OF_MUTATION_TYPES`or maybe `MUTATION_TYPES_NUMBER`
================
Comment at: lib/fuzzer/FuzzerMutationStats.cpp:25
Printf("%zd", M);
- if (&M != &TotalMutations.back()) Printf(", ");
+ if (&M != &TotalMutations.back()) Printf(",");
}
----------------
It doesn't look like you've uploaded your change properly. All the code of `MutationStats::PrintMutationCounts()` should be highlighted as new, not as a context. Please upload a diff made against `origin/master` or `origin/HEAD`.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D48054
More information about the llvm-commits
mailing list