Closed oharboe closed 1 year ago
@maliberty Strange. After this fix, which I wouldn't expect to fix the error in parsing the file, I no longer get an error, nor a crash: https://github.com/The-OpenROAD-Project/OpenROAD/pull/3206
@maliberty Do .odb files have version numbers? I rebased this fix on master and then tried against the .odb file from the docker image. So if .odb files are not compatible, but do not have a version number check, that would explain the segfault.
Added basic version check to avoid some unecessary confusion: https://github.com/The-OpenROAD-Project/OpenROAD/pull/3207
Coverity just flagged an issue related to dbIStream this morning that is likely to be the cause:
*** CID 1508956: Memory - illegal accesses (STRING_NULL)
/src/odb/src/db/dbProperty.cpp: 187 in odb::operator >>(odb::dbIStream &, odb::_dbProperty &)()
181 }
182 case DB_STRING_PROP: {
183 char* char_string;
184 stream >> char_string;
185 prop._value = "";
186 if (char_string != nullptr) {
>>> CID 1508956: Memory - illegal accesses (STRING_NULL)
>>> Passing unterminated string "char_string" to "basic_string", which expects a null-terminated string. [Note: The source code implementation of the function has been overridden by a builtin model.]
187 prop._value = std::string(char_string);
188 free(char_string);
189 }
190 break;
191 }
192 case DB_DOUBLE_PROP: {
I've asked @QuantamHD to fix it as it comes from his recent change.
Looks like this isn't related to the coverity as all the strings are read and serialized with a null termination.
@oharboe can you provide a specific set of steps to reproduce this issue.
@oharboe can you provide a specific set of steps to reproduce this issue.
@maliberty @QuantamHD I provided a confidential example, not being able to reproduce with public information. Hopefully that will be enough to move this forward.
@maliberty I'll reopen a github issue if this problem persists after the sanatizer cleanups.
Describe the bug
Run a flow from Docker to create a .odb file, load with local OpenROAD GUI in Ubuntu 22, crash:
Expected Behavior
This used to work.
Environment
To Reproduce
As above
Relevant log output
No response
Screenshots
No response
Additional Context
No response