The-OpenROAD-Project / The-OpenROAD-Project/OpenROAD

Use after free error in //src/dbSta/test:dbsta_unittest

Open
#10,833 2 comments 0 reactions 1 assignee View on GitHub

@dsengupta0628 is already working on this.

Since Jul 7, 2026.

dbSta
Dominant language
Verilog
Stars
3.1k
Forks
1k
Avg merge
2d 23h
Merged PRs (30d)
136

Description

Describe the bug

https://github.com/The-OpenROAD-Project/OpenROAD/blob/1e21a071b73dc8758b2a2ce02dfab351d2f1c39c/src/dbSta/test/cpp/TestDbSta.cc#L280-L332 relies on calling using memory previously free'ed and expecting that the result returned is different.

This causes test failures under asan.

This issue is to come up with a different way of performing the same test without the reliance on undefined behavior. One potential way is to assert that the timing graph/critical path has changed?

Expected Behavior

Test would ideally not rely on use-after-free behavior.

Environment
N/A
To Reproduce
bazelisk test src/dbSta/test:dbsta_unittest --cache_test_results=no  -c dbg --config=asan  --action_env=ASAN_OPTIONS="detect_odr_violation=0"
Relevant log output

Screenshots

No response

Additional Context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.