Skip to content

odb: remove corner data from dbExtControl#10740

Merged
maliberty merged 3 commits into
The-OpenROAD-Project:masterfrom
AcKoucher:odb-corner-data-ext-control
Jun 24, 2026
Merged

odb: remove corner data from dbExtControl#10740
maliberty merged 3 commits into
The-OpenROAD-Project:masterfrom
AcKoucher:odb-corner-data-ext-control

Conversation

@AcKoucher

@AcKoucher AcKoucher commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Remove the data regarding the corners used in extraction from the legacy dbExtControl object and make RCX build the corner data from the block.

Type of Change

  • Refactoring

Impact

None.

Verification

  • I have verified that the local build succeeds (./etc/Build.sh).
  • I have run the relevant tests and they pass.
  • My code follows the repository's formatting guidelines.
  • I have signed my commits (DCO).

@AcKoucher AcKoucher requested review from a team as code owners June 23, 2026 18:40
@AcKoucher AcKoucher requested a review from maliberty June 23, 2026 18:40

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes obsolete corner data (such as corner counts and factor lists) from dbExtControl and simplifies the corner retrieval logic in rcx by fetching corner information directly from _block. It also bumps the database schema version to 133 to maintain backward compatibility when reading older schemas. The review feedback highlights two potential issues: a possible null pointer dereference if _block is null when calling getCornerCount(), and a potential out-of-bounds read if _cornerCnt is zero when accessing map[0].

Comment thread src/rcx/src/netRC.cpp
Comment thread src/rcx/src/netRC.cpp
@AcKoucher AcKoucher marked this pull request as draft June 23, 2026 18:43
rcx: reconstruct corners from the block, not dbExtControl

Signed-off-by: Arthur Koucher <arthurkoucher@precisioninno.com>
@AcKoucher AcKoucher force-pushed the odb-corner-data-ext-control branch from e3ba1cf to 7d67931 Compare June 23, 2026 19:11
@AcKoucher AcKoucher marked this pull request as ready for review June 23, 2026 19:27
@maliberty

Copy link
Copy Markdown
Member

@codex review

@maliberty

Copy link
Copy Markdown
Member

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes obsolete corner count and corner/factor lists from dbExtControl and simplifies corner extraction and mapping logic in rcx by retrieving corner data directly from dbBlock. The database schema version is updated to 133 to handle backward compatibility during stream reading. The review feedback highlights potential null-pointer dereferences and out-of-bounds array accesses in getPrevControl() and makeCornerNameMap() if _block is null or _cornerCnt is zero, recommending defensive checks to prevent segmentation faults.

Comment thread src/rcx/src/netRC.cpp
Comment thread src/rcx/src/netRC.cpp
Signed-off-by: Arthur Koucher <arthurkoucher@precisioninno.com>
@AcKoucher

Copy link
Copy Markdown
Contributor Author

@maliberty I added defensive checks based on gemini's comments. I think that once we understand more of the code some of them will eventually go away with the correct call order.

Signed-off-by: Arthur Koucher <arthurkoucher@precisioninno.com>
@maliberty maliberty merged commit 59b6cd7 into The-OpenROAD-Project:master Jun 24, 2026
15 of 16 checks passed
@AcKoucher AcKoucher deleted the odb-corner-data-ext-control branch June 24, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants