diff options
| author | Kostya Serebryany <kcc@google.com> | 2015-10-16 22:41:47 +0000 |
|---|---|---|
| committer | Kostya Serebryany <kcc@google.com> | 2015-10-16 22:41:47 +0000 |
| commit | b91c62b1f3aa7f6e5dba3a75d5c38604d701cd16 (patch) | |
| tree | fd72fd900afe8b38bd24d2d7a1278efcba6bc894 /llvm/lib/Fuzzer/FuzzerLoop.cpp | |
| parent | 230c5c5b5241033bf8e786e80d3665b773dd4744 (diff) | |
| download | bcm5719-llvm-b91c62b1f3aa7f6e5dba3a75d5c38604d701cd16.tar.gz bcm5719-llvm-b91c62b1f3aa7f6e5dba3a75d5c38604d701cd16.zip | |
[libFuzzer] When -test_single_input crashes the test it is not necessary to write crash-file because input is already known to the user. Patch by Mike Aizatsky
llvm-svn: 250564
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerLoop.cpp')
| -rw-r--r-- | llvm/lib/Fuzzer/FuzzerLoop.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerLoop.cpp b/llvm/lib/Fuzzer/FuzzerLoop.cpp index ec0b1176e28..9b238cb05b1 100644 --- a/llvm/lib/Fuzzer/FuzzerLoop.cpp +++ b/llvm/lib/Fuzzer/FuzzerLoop.cpp @@ -237,6 +237,8 @@ void Fuzzer::WriteToOutputCorpus(const Unit &U) { } void Fuzzer::WriteUnitToFileWithPrefix(const Unit &U, const char *Prefix) { + if (!Options.SaveArtifacts) + return; std::string Path = Options.ArtifactPrefix + Prefix + Hash(U); WriteToFile(U, Path); Printf("artifact_prefix='%s'; Test unit written to %s\n", |

