trailofbits / trailofbits/pe-parse

Reduce reference set of pe-parse - peparse::`dynamic initializer for 'ProductIdMap''

Open
#188 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted
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

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.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.