The-OpenROAD-Project / OpenROAD

OpenROAD's unified application implementing an RTL-to-GDS Flow. Documentation at https://openroad.readthedocs.io/en/latest/
https://theopenroadproject.org/
BSD 3-Clause "New" or "Revised" License
1.41k stars 494 forks source link

dpl: check if db_inst_ exists before accessing it #5210

Closed eder-matheus closed 2 weeks ago

eder-matheus commented 2 weeks ago

Fixes https://github.com/The-OpenROAD-Project/OpenROAD/issues/5205

eder-matheus commented 2 weeks ago

@maliberty I found that the db_inst being nullptr was the cause of the issue, but I couldn't see why it is nullptr at this point. The position of the Cell that is returned by the pixel doesn't have any cell on it.

github-actions[bot] commented 2 weeks ago

clang-tidy review says "All clean, LGTM! :+1:"

maliberty commented 2 weeks ago

Which issue is this related to?

eder-matheus commented 2 weeks ago

Which issue is this related to?

This issue: https://github.com/The-OpenROAD-Project/OpenROAD/issues/5205 The only difference I first noticed is using REGION and GROUP, but we don't have this specific crash in other test cases from the same user.

maliberty commented 2 weeks ago

The cell is the dummy_cell used by groupInitPixels and groupInitPixels2. It is used to block the area outside the region during placement of the group. I think it is better to move the check into isBlock itself.

isBlock should be a method of Cell not Opendp.

github-actions[bot] commented 2 weeks ago

clang-tidy review says "All clean, LGTM! :+1:"