From b91c62b1f3aa7f6e5dba3a75d5c38604d701cd16 Mon Sep 17 00:00:00 2001 From: Kostya Serebryany Date: Fri, 16 Oct 2015 22:41:47 +0000 Subject: [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 --- llvm/lib/Fuzzer/FuzzerLoop.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib/Fuzzer/FuzzerLoop.cpp') 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", -- cgit v1.2.3