Fix uninitialized data in verFiles.dat, bug1385.

This commit is contained in:
Wilson Snyder 2019-01-05 04:58:14 -05:00
parent 8a4aeddbb0
commit 0e1f8db0d1
2 changed files with 6 additions and 3 deletions

View File

@ -17,6 +17,8 @@ The contributors that suggested a given feature are shown in []. Thanks!
**** Fix missing too many digits warning, bug1380. [Jonathan Kimmitt]
**** Fix uninitialized data in verFiles.dat, bug1385. [Al Grant]
* Verilator 4.008 2018-12-01

View File

@ -86,9 +86,10 @@ class V3FileDependImp {
if (!m_stat.st_mtime) {
string fn = filename();
int err = stat(fn.c_str(), &m_stat);
if (err!=0) {
m_stat.st_mtime = 1;
// Not a error... This can occur due to `line directives in the .vpp files
if (err!=0) {
memset(&m_stat, 0, sizeof(m_stat));
m_stat.st_mtime = 1;
// Not an error... This can occur due to `line directives in the .vpp files
UINFO(1,"-Info: File not statable: "<<filename()<<endl);
}
}