From a9a548049a29fb73b95bfdeea1a606b42a8d5c85 Mon Sep 17 00:00:00 2001 From: Kostya Serebryany Date: Wed, 17 Aug 2016 20:45:23 +0000 Subject: [libFuzzer] when printing the reproducer input, also print the base input and the mutation sequence llvm-svn: 278975 --- llvm/lib/Fuzzer/FuzzerLoop.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'llvm/lib/Fuzzer/FuzzerLoop.cpp') diff --git a/llvm/lib/Fuzzer/FuzzerLoop.cpp b/llvm/lib/Fuzzer/FuzzerLoop.cpp index 07de3c7..5d94483 100644 --- a/llvm/lib/Fuzzer/FuzzerLoop.cpp +++ b/llvm/lib/Fuzzer/FuzzerLoop.cpp @@ -204,6 +204,8 @@ void Fuzzer::StaticDeathCallback() { void Fuzzer::DumpCurrentUnit(const char *Prefix) { if (!CurrentUnitData) return; // Happens when running individual inputs. + MD.PrintMutationSequence(); + Printf("; base unit: %s\n", Sha1ToString(BaseSha1).c_str()); size_t UnitSize = CurrentUnitSize; if (UnitSize <= kMaxUnitSizeToPrint) { PrintHexArray(CurrentUnitData, UnitSize, "\n"); @@ -693,6 +695,7 @@ void Fuzzer::MutateAndTestOne() { MD.StartMutationSequence(); auto &U = ChooseUnitToMutate(); + ComputeSHA1(U.data(), U.size(), BaseSha1); // Remember where we started. assert(CurrentUnitData); size_t Size = U.size(); assert(Size <= Options.MaxLen && "Oversized Unit"); -- cgit v1.1