[fuzzer] make multi-process execution more verbose; fix mutation to actually respect mutation depth and to never produce empty units

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228170 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Kostya Serebryany
2015-02-04 19:10:20 +00:00
parent 70e83e3a1c
commit eb884daa38
6 changed files with 46 additions and 18 deletions

View File

@ -146,9 +146,8 @@ void Fuzzer::SaveCorpus() {
size_t Fuzzer::MutateAndTestOne(Unit *U) {
size_t NewUnits = 0;
for (size_t i = 0; i < Options.MutateDepth; i++) {
for (int i = 0; i < Options.MutateDepth; i++) {
Mutate(U, Options.MaxLen);
if (U->empty()) continue;
size_t NewCoverage = RunOne(*U);
if (NewCoverage) {
Corpus.push_back(*U);
@ -158,6 +157,7 @@ size_t Fuzzer::MutateAndTestOne(Unit *U) {
<< "\tNEW: " << NewCoverage
<< " L: " << U->size()
<< " S: " << Corpus.size()
<< " I: " << i
<< "\t";
if (U->size() < 30) {
PrintASCII(*U);