[PR #296] [MERGED] fix(dotnet): correct CLI pointer and byref signatures #1932

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/296
Author: @N0zoM1z0
Created: 7/17/2026
Status: ✅ Merged
Merged: 7/17/2026
Merged by: @N0zoM1z0

Base: main ← Head: agent/fix-dotnet-pointer-byref-signatures


📝 Commits (1)

  • fb9ff56 fix(dotnet): correct CLI pointer and byref signatures

📊 Changes

3 files changed (+40 additions, -8 deletions)

View changed files

📝 src/dotnet/ManagedMemberInspector.ts (+8 -6)
📝 tests/fixtures/managedPe.ts (+8 -2)
📝 tests/managedArtifactProvider.test.ts (+24 -0)

📄 Description

What changed

  • map ECMA-335 ELEMENT_TYPE_PTR (0x0f) to *
  • map ECMA-335 ELEMENT_TYPE_BYREF (0x10) to &
  • use one table-driven suffix decoder for recursive pointer/byref signatures
  • let the source-owned PE fixture accept explicit field and method signatures
  • add regression coverage for field, return, parameter, nested pointer, and pointer-array forms

Why

The managed signature decoder had the pointer and byref suffixes reversed. That produced semantically incorrect caller-visible field and method signatures even though the underlying metadata bytes were valid.

Impact

inspect_managed_members now reports pointer and managed-reference forms with their correct ECMA-335 meaning. The change affects decoded signature text only; raw signature lengths and SHA-256 commitments remain unchanged.

Validation

  • npm run check
  • 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/managedArtifactProvider.test.ts — 12 tests passed

Real provider verification

Real Hopper/Ghidra verification was not performed because this change affects execution-free PE/CLI signature decoding. The optional real ilspycmd oracle was performed.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/296 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 7/17/2026 **Status:** ✅ Merged **Merged:** 7/17/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `agent/fix-dotnet-pointer-byref-signatures` --- ### 📝 Commits (1) - [`fb9ff56`](https://github.com/morluto/rea/commit/fb9ff5659dffb6af5185c9465ddac6e86eca7dd2) fix(dotnet): correct CLI pointer and byref signatures ### 📊 Changes **3 files changed** (+40 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `src/dotnet/ManagedMemberInspector.ts` (+8 -6) 📝 `tests/fixtures/managedPe.ts` (+8 -2) 📝 `tests/managedArtifactProvider.test.ts` (+24 -0) </details> ### 📄 Description ## What changed - map ECMA-335 `ELEMENT_TYPE_PTR` (`0x0f`) to `*` - map ECMA-335 `ELEMENT_TYPE_BYREF` (`0x10`) to `&` - use one table-driven suffix decoder for recursive pointer/byref signatures - let the source-owned PE fixture accept explicit field and method signatures - add regression coverage for field, return, parameter, nested pointer, and pointer-array forms ## Why The managed signature decoder had the pointer and byref suffixes reversed. That produced semantically incorrect caller-visible field and method signatures even though the underlying metadata bytes were valid. ## Impact `inspect_managed_members` now reports pointer and managed-reference forms with their correct ECMA-335 meaning. The change affects decoded signature text only; raw signature lengths and SHA-256 commitments remain unchanged. ## Validation - `npm run check` - `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/managedArtifactProvider.test.ts` — 12 tests passed ## Real provider verification Real Hopper/Ghidra verification was not performed because this change affects execution-free PE/CLI signature decoding. The optional real `ilspycmd` oracle was performed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#1932
No description provided.