From e96dc98acb26934245c9c1de3382f03bebbd7406 Mon Sep 17 00:00:00 2001 From: Kostya Serebryany Date: Tue, 8 Sep 2015 20:36:33 +0000 Subject: [PATCH] [libFuzzer] be more robust when dealing with files on disk (e.g. don't crash if a file was there but disappeared) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247066 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Fuzzer/FuzzerIO.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/Fuzzer/FuzzerIO.cpp b/lib/Fuzzer/FuzzerIO.cpp index a68c6c579bf..b6ffb752de3 100644 --- a/lib/Fuzzer/FuzzerIO.cpp +++ b/lib/Fuzzer/FuzzerIO.cpp @@ -21,10 +21,8 @@ namespace fuzzer { static long GetEpoch(const std::string &Path) { struct stat St; - if (stat(Path.c_str(), &St)) { - Printf("Can not stat: %s; exiting\n", Path.c_str()); - exit(1); - } + if (stat(Path.c_str(), &St)) + return 0; // Can't stat, be conservative. return St.st_mtime; } -- 2.34.1