The-OpenROAD-Project / The-OpenROAD-Project/OpenSTA
Refactor PortDirection.cc to minimize manual memory allocation
Nobody has claimed this yet.
- Dominant language
- Verilog
- Stars
- 619
- Forks
- 270
- Avg merge
- 5d 15h
- Merged PRs (30d)
- 4
Description
Patterns that rely on the user knowing and managing the proper initialization and destruction sequence of objects such as
https://github.com/The-OpenROAD-Project/OpenSTA/blob/master/network/PortDirection.cc#L29-L53
cause issues with code sanitizer tools and when using OpenSTA as a library -- especially when attempting to create and use multiple instances of OpenSTA.
This issue is to refactor PortDirection to reduce the need for careful management of its memory. Several options exist:
- Replace with an enum
- Replace heap allocation with static allocation and use of NoDestructor pattern
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with PortDirection.cc, especially lines 29-53, and trace how initialization and destruction are currently managed. Compare the enum and static-allocation options; done means PortDirection no longer requires careful user-managed memory sequencing and works safely with sanitizers and multiple OpenSTA instances.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100