trailofbits / trailofbits/pe-parse
Reduce reference set of pe-parse - peparse::`dynamic initializer for 'ProductIdMap''
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 911
- Forks
- 171
- PR merge metrics
- No merged PRs in 30d
Description
This library has a dynamic initializer for ProductIdMap and ProductMap, which causes the process to allocate and commit 13 pages.
Ask:
Allocate these pages on demand.
Both of these objects are only used in parse.cpp and are used from GetRichProductName and GetRichObjectType.
Proposal:
Switch these to allocate these data structures on demand.
Contributor guide
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 in parse.cpp and inspect ProductIdMap and ProductMap, including their use in GetRichProductName and GetRichObjectType. Determine how these objects are initialized and change them to allocate on demand rather than during dynamic initialization. Done means the eager allocation of 13 pages is avoided while both lookup functions continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- reverse-engineering
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100