[PR #295] fix(managed): emit valid x64 conformance PE #1931

Closed
opened 2026-10-16 21:12:37 +00:00 by bsakaguchi · 0 comments
Owner

Original Pull Request: https://github.com/morluto/rea/pull/295

State: closed
Merged: Yes


What changed

  • emit PE32+ optional headers for x86-64 and ARM64 managed conformance fixtures
  • place the CLI data directory and section table at architecture-correct offsets
  • add TypeScript declarations for the source-owned managed PE fixture builder
  • add a regression test that parses an x86-64 fixture through the production binary-target boundary

Why

The managed conformance verifier selected an x86-64 COFF machine while continuing to emit a PE32 optional header. Production admission correctly rejected that contradictory artifact before the ReadyToRun assertions could run.

Impact

npm run verify:managed can now exercise its x64 ReadyToRun/native-body slice using a syntactically consistent PE32+ fixture. Ordinary PE32 fixtures retain their existing layout.

Validation

  • npm run check — 155 test files, 1032 tests passed
  • REA_ILSPY_CMD_PATH=/home/pentester/.dotnet/tools/ilspycmd npm run verify:managed — 13 verification slices passed, including x64 ReadyToRun and ILSpy 9.1 reconstruction oracle
  • npx vitest run --coverage.enabled=false tests/managedConformanceFixture.test.ts

Real provider verification

Real Hopper/Ghidra verification was not performed because this change affects only the source-owned managed conformance fixture. The optional real ilspycmd oracle was performed.

**Original Pull Request:** https://github.com/morluto/rea/pull/295 **State:** closed **Merged:** Yes --- ## What changed - emit PE32+ optional headers for x86-64 and ARM64 managed conformance fixtures - place the CLI data directory and section table at architecture-correct offsets - add TypeScript declarations for the source-owned managed PE fixture builder - add a regression test that parses an x86-64 fixture through the production binary-target boundary ## Why The managed conformance verifier selected an x86-64 COFF machine while continuing to emit a PE32 optional header. Production admission correctly rejected that contradictory artifact before the ReadyToRun assertions could run. ## Impact `npm run verify:managed` can now exercise its x64 ReadyToRun/native-body slice using a syntactically consistent PE32+ fixture. Ordinary PE32 fixtures retain their existing layout. ## Validation - `npm run check` — 155 test files, 1032 tests passed - `REA_ILSPY_CMD_PATH=/home/pentester/.dotnet/tools/ilspycmd npm run verify:managed` — 13 verification slices passed, including x64 ReadyToRun and ILSpy 9.1 reconstruction oracle - `npx vitest run --coverage.enabled=false tests/managedConformanceFixture.test.ts` ## Real provider verification Real Hopper/Ghidra verification was not performed because this change affects only the source-owned managed conformance fixture. The optional real `ilspycmd` oracle was performed.
bsakaguchi 2026-10-16 21:12:37 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#1931
No description provided.