diff options
| author | Kostya Serebryany <kcc@google.com> | 2016-05-28 04:19:46 +0000 |
|---|---|---|
| committer | Kostya Serebryany <kcc@google.com> | 2016-05-28 04:19:46 +0000 |
| commit | 311cc8378e7e4ddf2f944963dcaf05e8a843cf83 (patch) | |
| tree | daf57f5ab90f7ad314e91820217e612b3bcff12f /llvm/lib/Fuzzer/FuzzerLoop.cpp | |
| parent | 8c7e12136c267fe525e88c05946f7aee11958ff1 (diff) | |
| download | bcm5719-llvm-311cc8378e7e4ddf2f944963dcaf05e8a843cf83.tar.gz bcm5719-llvm-311cc8378e7e4ddf2f944963dcaf05e8a843cf83.zip | |
[libFuzzer] fix a failure that occurs when running individual inputs
llvm-svn: 271095
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerLoop.cpp')
| -rw-r--r-- | llvm/lib/Fuzzer/FuzzerLoop.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerLoop.cpp b/llvm/lib/Fuzzer/FuzzerLoop.cpp index 6f10c6390f3..fb75a9bb223 100644 --- a/llvm/lib/Fuzzer/FuzzerLoop.cpp +++ b/llvm/lib/Fuzzer/FuzzerLoop.cpp @@ -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"); |

