Skip to content

rsz: Avoid SIGILL in net tree stitching if subtree can't build#10904

Open
mikesinouye wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
mikesinouye:bnet
Open

rsz: Avoid SIGILL in net tree stitching if subtree can't build#10904
mikesinouye wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
mikesinouye:bnet

Conversation

@mikesinouye

@mikesinouye mikesinouye commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

This can happen when calling repair_timing on a pre-placement netlist where buffered nets can fail to build if estimate_parasitics -placement was called.

Type of Change

  • Bug fix

Impact

[How does this change the tool's behavior?]
Avoids crashes of the form:

[INFO RSZ-0099] Repairing XXX out of XXX (100.00%) violating endpoints...
   Iter   | Removed | Resized | Inserted | Cloned |  Pin  |   Area   |    WNS   |   StTNS    |   EnTNS    |  Viol  |  Worst  
          | Buffers |  Gates  | Buffers  |  Gates | Swaps |          |          |            |            | Endpts | St/EnPt 
------------------------------------------------------------------------------------------------------------------------------
       0* |       0 |       0 |        0 |      0 |     0 |    +0.0% |   -X.XXX |     -XXX.X |     -XXX.X |    XXX | X
[WARNING RSZ-0075] makeBufferedNet failed for driver gain22/Z
[WARNING RSZ-0075] makeBufferedNet failed for driver _34181_/ZN
[WARNING RSZ-0075] makeBufferedNet failed for driver _34273_/ZN
SIGSEGV (@0x4)
rsz::Resizer::stitchTrees()::$_0::operator()<>()
rsz::Resizer::stitchTrees()::$_0::operator()<>()
rsz::Resizer::stitchTrees()::$_0::operator()<>()
rsz::Resizer::stitchTrees()
rsz::Resizer::estimateSlewsAfterBufferRemoval()
rsz::Resizer::estimatedSlackOK()
rsz::(anonymous namespace)::passesSlackGuard()
rsz::UnbufferGenerator::generate()
rsz::SetupLegacyBase::tryCandidateSequence()
rsz::SetupLegacyBase::tryRepairTarget()
rsz::SetupLegacyBase::repairPath()
rsz::SetupLegacyPolicy::repairEndpoint()
rsz::SetupLegacyPolicy::runMainRepairLoop()
rsz::SetupLegacyPolicy::iterate()
rsz::Optimizer::run()
rsz::Resizer::repairSetup()
_wrap_repair_setup()
TclEvalEx
Tcl_Eval
sta::sourceTclFile()
ord::tclInit()
ord::tclAppInit()
Tcl_MainEx
main

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).

This can happen when calling repair_timing on a pre-placement netlist where buffered nets can fail to build.

Signed-off-by: Mike Inouye <mikeinouye@google.com>
@mikesinouye
mikesinouye requested a review from a team as a code owner July 13, 2026 22:02
@mikesinouye
mikesinouye requested a review from jhkim-pii July 13, 2026 22:02

@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 adds null pointer checks for tree1 and tree2 in Resizer::estimateSlewsAfterBufferRemoval before they are passed to stitchTrees, preventing potential null pointer dereferences. There are no review comments, and I have no additional feedback to provide.

@maliberty

Copy link
Copy Markdown
Member

Its always worth fixing a segv but I'm not sure what you are hoping to use this for? Buffering wants there to be placement to do much as it relies on Steiner trees. The gain based buffering is intended for pre-placement usage.

@mikesinouye

mikesinouye commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

We have a 'synthesis' that does:

yosys
read_verilog
read_sdc
remove_buffers
repair_design -pre_placement
# estimate_parasitics -placement
repair_timing

This correlates much more strongly on perf than the raw Yosys netlist using the abc buffering solution and Vt/strength selection. This bug was found as a recent unrelated flow change causes the est call to be run, which then SIGILLs repair_timing. However, I would expect this to be a no-op.

Does this flow make sense to you? Our data suggests it is useful for the runtime cost.

@maliberty

Copy link
Copy Markdown
Member

You will get some optimization that way (eg Vt swap) but other parts will fail and get skipped. If that is useful that's fine but be aware it isn't a full optimization like you would get after placement.

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