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/FuzzerIO.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/lib/Fuzzer/FuzzerIO.cpp') diff --git a/llvm/lib/Fuzzer/FuzzerIO.cpp b/llvm/lib/Fuzzer/FuzzerIO.cpp index b6ffb752de3..4bb2df5d71a 100644 --- a/llvm/lib/Fuzzer/FuzzerIO.cpp +++ b/llvm/lib/Fuzzer/FuzzerIO.cpp @@ -49,6 +49,10 @@ static std::vector ListFilesInDir(const std::string &Dir, Unit FileToVector(const std::string &Path) { std::ifstream T(Path); + if (!T) { + Printf("No such directory: %s; exiting\n", Path.c_str()); + exit(1); + } return Unit((std::istreambuf_iterator(T)), std::istreambuf_iterator()); } -- cgit v1.2.3