mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-16 23:19:37 +00:00
[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
This commit is contained in:
parent
21b2bb4054
commit
e96dc98acb
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user