Repository navigation
refactor(pe): share positional COFF header observation - #12173
Merged
Merged
Conversation
morluto
marked this pull request as ready for review
November 19, 2026 03:08
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
[Medium impact] The reviewed changes appear safe to merge. SummaryThis refactor gives native sections and PE resource/certificate readers one shared reader for the PE signature and COFF header.
No actionable issues found. No higher replacement PR is listed in the supplied stack. Tests were not run during this review. Reviews (1) · Last reviewed commit: "refactor(pe): share positional COFF head..." · Reviewed by Greptile |
11 tasks
morluto
added a commit
that referenced
this pull request
Nov 19, 2026
#12156) * fix(elf): share dynamic table singleton validation * fix(elf): share note storage and framing across readers Refs #12130 * fix(elf): retain zero-filled load mapping ambiguity Refs #12136 * fix(pe): share header extent admission Refs #12143 * fix(macho): share embedded section backing checks Refs #12142 * fix(pe): share header facts and validate resource directory order * fix(macho): require complete carrier load command framing * fix(pe): probe declared resource headers by file offset * fix(elf): preserve zero-fill observations across mapping gaps * refactor(pe): share positional COFF header observation (#12173) * fix(elf): check load-map agreement across section extents (#12175) * fix(elf): check load-map agreement across section extents * fix(elf): preserve agreed section links across unreadable tables
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Share the positional PE signature and COFF observation across the native section directory and the PE resource and certificate header reader. The producer returns parsed COFF facts from one bounded frame. A standard PE whose header lies outside the DOS prefix now requires one request for the signature and COFF record.
This is the focused PE framing follow-up to #12156 and the duplicated header thread in #7024. The exception-directory feature remains in its existing draft.
Contract and boundary impact
Each reader keeps its current admission policy for overlapping DOS layouts, PE header extents, malformed declarations and unsupported formats. A short NE signature can still establish its Windows format without a complete PE COFF record. Resource RVA mapping and the certificate table's file-offset interpretation remain with their consumers. There is no package, CLI or MCP schema change.
Validation performed
npm run check:fastandgit diff --checkpassed. The verification used authored fixtures and no live Windows loader or provider.Author readiness
Human owner: @morluto