mirror of
https://github.com/verilator/verilator.git
synced 2026-10-07 10:33:13 +02:00
Fix compilers seeing empty input due to file system races (#4708).
This commit is contained in:
+2
-2
@@ -191,7 +191,7 @@ void V3FileDependImp::writeTimes(const string& filename, const string& cmdlineIn
|
||||
// Read stats of files we create after we're done making them
|
||||
// (except for this file, of course)
|
||||
DependFile* const dfp = const_cast<DependFile*>(&(*iter));
|
||||
V3Options::fileNfsFlush(dfp->filename());
|
||||
V3Os::filesystemFlush(dfp->filename());
|
||||
dfp->loadStats();
|
||||
off_t showSize = iter->size();
|
||||
ino_t showIno = iter->ino();
|
||||
@@ -256,7 +256,7 @@ bool V3FileDependImp::checkTimes(const string& filename, const string& cmdlineIn
|
||||
*ifp >> quote;
|
||||
const string chkFilename = V3Os::getline(*ifp, '"');
|
||||
|
||||
V3Options::fileNfsFlush(chkFilename);
|
||||
V3Os::filesystemFlush(chkFilename);
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-member-init)
|
||||
struct stat chkStat;
|
||||
const int err = stat(chkFilename.c_str(), &chkStat);
|
||||
|
||||
Reference in New Issue
Block a user