[libFuzzer] print stats if we crash on empty input
llvm-svn: 270639
diff --git a/llvm/lib/Fuzzer/FuzzerLoop.cpp b/llvm/lib/Fuzzer/FuzzerLoop.cpp
index ed8a1fb..ccd1c4e 100644
--- a/llvm/lib/Fuzzer/FuzzerLoop.cpp
+++ b/llvm/lib/Fuzzer/FuzzerLoop.cpp
@@ -177,9 +177,10 @@
NO_SANITIZE_MEMORY
void Fuzzer::DeathCallback() {
- if (!CurrentUnitSize) return;
- Printf("DEATH:\n");
- DumpCurrentUnit("crash-");
+ if (CurrentUnitSize) {
+ Printf("DEATH:\n");
+ DumpCurrentUnit("crash-");
+ }
PrintFinalStats();
}