[llvm] r271095 - [libFuzzer] fix a failure that occurs when running individual inputs
Kostya Serebryany via llvm-commits
llvm-commits at lists.llvm.org
Fri May 27 21:19:46 PDT 2016
Author: kcc
Date: Fri May 27 23:19:46 2016
New Revision: 271095
URL: http://llvm.org/viewvc/llvm-project?rev=271095&view=rev
Log:
[libFuzzer] fix a failure that occurs when running individual inputs
Modified:
llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp
Modified: llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp?rev=271095&r1=271094&r2=271095&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp (original)
+++ llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp Fri May 27 23:19:46 2016
@@ -175,6 +175,7 @@ void Fuzzer::StaticDeathCallback() {
}
void Fuzzer::DumpCurrentUnit(const char *Prefix) {
+ if (!CurrentUnitData) return; // Happens when running individual inputs.
size_t UnitSize = CurrentUnitSize;
if (UnitSize <= kMaxUnitSizeToPrint) {
PrintHexArray(CurrentUnitData, UnitSize, "\n");
More information about the llvm-commits
mailing list