Closed macd closed 1 year ago
@macd why are you directly calling the make_region_domain
? I can add a check that the region is NULL, but you should not be calling them directly in TCL.
I get that, but a user could still do as I did. I only found it by trying to recreate in Python some of the functionality in the tcl API.
Describe the bug
When running the following script in the OpenROAD/src/pdn/test directory, it segfaults (OOM)
Expected Behavior
No crashes.
Environment
To Reproduce
run the following script in the OpenROAD/src/pdn/test directory
Relevant log output
Screenshots
No response
Additional Context
Exposure of this to end users is maybe minimal, but roughly what happens is that a voltage domain is defined before a core domain. Then when one of the commands does a findDomain("Core") (which is in PdnGen.cc) the very first thing it does is to call "ensureCoreDomain()" which winds up adding an new superfluous domain (because coredomain is not set) Then when getDomainRows, from domain.cpp, is called it hits an finite recursion between getRows and getDomainRows. I guess the fix would be either to 1) disallow creating a voltage domain before the core domain, or 2) put in a call to ensureCoreDomain() as the very first thing in makeRegionVoltageDomain, (in PdnGen.cc), but honestly, I don't know this code well enough to do much more.