[PR #669] [MERGED] fix(native): retain spaced symbols in dyld inventory #2153

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/669
Author: @rudycelekli
Created: 10/6/2026
Status: ✅ Merged
Merged: 10/6/2026
Merged by: @morluto

Base: main ← Head: fix/rea-dyld-symbol-whitespace-20261006


📝 Commits (1)

  • 335e152 fix(native): retain spaced symbols in dyld inventory

📊 Changes

2 files changed (+54 additions, -3 deletions)

View changed files

📝 src/native/parsers/dyldInfo.ts (+3 -3)
📝 tests/boundary/providers/native/nativeInventory.golden.test.ts (+51 -0)

📄 Description

Summary

Keep complete symbol names in Apple's dyld import, export, and re-export rows. Mach-O symbol names can contain spaces; the current \S+ field drops such imports and exports. The nm fallback preserves an export's spelling but cannot recover its dyld address or attributes.

A native compiler reproduction uses __asm__("_entry with space") in a dylib, then links a consumer against that dylib. The actual tool output includes:

offset      symbol
0x00000348  _entry with space
0x0000  _entry with space  (from fixture)

Before the fix, public NativeMacOSProvider inspection reports no matching import and falls back to an export with a null address. Afterward it reports the complete import name/source and the export's 0x348 address. The existing weak, absolute, and re-export suffix parsing is retained.

Verification

  • Before: the new dyld regression fails; the actual compiled provider reproduction confirms the lost import and export address.
  • npm run test:focused -- tests/boundary/providers/native/nativeInventory.golden.test.ts — 3 tests passed, including the new four-case regression.
  • npm run check — all five tasks passed.
  • Actual host clang-built dylib and executable → filesystem BinaryTargetResolver → NativeMacOSProvider using real XcrunCommandRunner: before fails, after passes.
  • No new contracts or generated metadata. No Hopper, Ghidra, or GUI verification is claimed; these provider paths are unchanged.

AI assistance was used for implementation and testing; the patch and actual native reproduction were reviewed before publication.


🔄 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/669 **Author:** [@rudycelekli](https://github.com/rudycelekli) **Created:** 10/6/2026 **Status:** ✅ Merged **Merged:** 10/6/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/rea-dyld-symbol-whitespace-20261006` --- ### 📝 Commits (1) - [`335e152`](https://github.com/morluto/rea/commit/335e15280a13dacf860c8a600e995968bfe745c8) fix(native): retain spaced symbols in dyld inventory ### 📊 Changes **2 files changed** (+54 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/native/parsers/dyldInfo.ts` (+3 -3) 📝 `tests/boundary/providers/native/nativeInventory.golden.test.ts` (+51 -0) </details> ### 📄 Description ## Summary Keep complete symbol names in Apple's dyld import, export, and re-export rows. Mach-O symbol names can contain spaces; the current `\S+` field drops such imports and exports. The nm fallback preserves an export's spelling but cannot recover its dyld address or attributes. A native compiler reproduction uses `__asm__("_entry with space")` in a dylib, then links a consumer against that dylib. The actual tool output includes: ```text offset symbol 0x00000348 _entry with space 0x0000 _entry with space (from fixture) ``` Before the fix, public NativeMacOSProvider inspection reports no matching import and falls back to an export with a null address. Afterward it reports the complete import name/source and the export's `0x348` address. The existing weak, absolute, and re-export suffix parsing is retained. ## Verification - Before: the new dyld regression fails; the actual compiled provider reproduction confirms the lost import and export address. - `npm run test:focused -- tests/boundary/providers/native/nativeInventory.golden.test.ts` — 3 tests passed, including the new four-case regression. - `npm run check` — all five tasks passed. - Actual host clang-built dylib and executable → filesystem BinaryTargetResolver → NativeMacOSProvider using real XcrunCommandRunner: before fails, after passes. - No new contracts or generated metadata. No Hopper, Ghidra, or GUI verification is claimed; these provider paths are unchanged. AI assistance was used for implementation and testing; the patch and actual native reproduction were reviewed before publication. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:14:57 +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#2153
No description provided.