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/FuzzerIO.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/FuzzerIO.cpp')
-rw-r--r-- | llvm/lib/Fuzzer/FuzzerIO.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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<std::string> 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<char>(T)), std::istreambuf_iterator<char>()); } |