[PR #2110] [MERGED] fix(artifacts): preserve Mach-O load-command string identity #5038

Closed
opened 2026-10-31 00:59:48 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2110
Author: @1052326311
Created: 10/12/2026
Status: ✅ Merged
Merged: 10/13/2026
Merged by: @morluto

Base: main ← Head: fix/macho-load-name-identity


📝 Commits (9)

  • 9d3b876 fix(artifacts): preserve Mach-O load-command string identity
  • b7de943 chore: merge upstream CI baseline fixes
  • 4c3c2f4 fix(process): report no remaining time after a provider deadline fires
  • c94818b chore: sync main and retain separately owned provider deadlines
  • bd4eed2 fix(ci): isolate Linux Hopper process fixture inventory
  • f7a159a fix(comparison): recheck historical calls-only changes (#2223)
  • f2af17a style: format identity comparison and IDA runner
  • 30da428 Merge commit '8fef2aa64e' into HEAD
  • 7dd981f Merge branch 'main' into fix/macho-load-name-identity

📊 Changes

3 files changed (+74 additions, -1 deletions)

View changed files

📝 src/artifacts/apple/MachoLoadCommandReader.test.ts (+21 -0)
📝 src/artifacts/apple/MachoLoadCommandReader.ts (+2 -1)
📝 tests/boundary/cli/dylibResolutionCli.test.ts (+51 -0)

📄 Description

Summary

Preserve a leading U+FEFF when decoding NUL-terminated Mach-O load-command strings. It is part of the source name/path identity, not a text-file byte-order marker. Stripping it can change an install name and cause an unrelated dylib to appear to resolve.

Original Mach-O change author: @1052326311.

Scope

This PR changes only Mach-O string decoding and its parser/CLI regressions. It sets ignoreBOM: true on the existing fatal UTF-8 decoder; load-command bounds, NUL termination, and invalid UTF-8 rejection remain intact. The focused parser regression covers LC_ID_DYLIB, LC_LOAD_DYLIB, LC_RPATH, and LC_DYLD_ENVIRONMENT. The CLI regression checks ordinary and U+FEFF-prefixed names and confirms that the prefixed identity does not resolve as the ordinary library.

The historical calls-only reconstruction policy change raised in review is not part of this PR's current diff. It is already on the current base in commit 688defca0 fix(comparison): recheck historical calls-only changes (#2223), authored by Lucien (164857476+dakjdakd@users.noreply.github.com).

Validation

Maintenance review inspected the exact diff against current base, ran pinned Oxfmt 0.72.0 on the merge-conflict file, and ran git diff --check. Tests and builds were not run in this maintenance pass. The captured earlier CI run was for the pre-merge head and reported a formatting issue in scripts/lib/clean-linux-hopper-runtime.mjs plus reconstruction comparison failures; the format issue was corrected during the current-base merge, and the comparison behavior is now on the base. Current-head CI is queued/in progress.


🔄 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/2110 **Author:** [@1052326311](https://github.com/1052326311) **Created:** 10/12/2026 **Status:** ✅ Merged **Merged:** 10/13/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/macho-load-name-identity` --- ### 📝 Commits (9) - [`9d3b876`](https://github.com/morluto/rea/commit/9d3b876428acdd9e923ced0244b8d0c10dea116f) fix(artifacts): preserve Mach-O load-command string identity - [`b7de943`](https://github.com/morluto/rea/commit/b7de9437338d14051419b8b71a422fc7324692bd) chore: merge upstream CI baseline fixes - [`4c3c2f4`](https://github.com/morluto/rea/commit/4c3c2f4e1fae54d715cdb15aac34f2ffdfb5ba2a) fix(process): report no remaining time after a provider deadline fires - [`c94818b`](https://github.com/morluto/rea/commit/c94818bdf9867619b2b749434d0e13750c870df0) chore: sync main and retain separately owned provider deadlines - [`bd4eed2`](https://github.com/morluto/rea/commit/bd4eed2740f5b82b3e7ec17eaad2a6d4c6b9a177) fix(ci): isolate Linux Hopper process fixture inventory - [`f7a159a`](https://github.com/morluto/rea/commit/f7a159a39dc015aeaa49de2e66493776766f922b) fix(comparison): recheck historical calls-only changes (#2223) - [`f2af17a`](https://github.com/morluto/rea/commit/f2af17a3b3ecda72b4307fd88f48bf3445d0a362) style: format identity comparison and IDA runner - [`30da428`](https://github.com/morluto/rea/commit/30da428cb5024fd095b3a2a434146e250a01e7f4) Merge commit '8fef2aa64ec1ee742e8b70b825938d30a0ea7319' into HEAD - [`7dd981f`](https://github.com/morluto/rea/commit/7dd981f7e5776834d1bbba8c716116e370a265a6) Merge branch 'main' into fix/macho-load-name-identity ### 📊 Changes **3 files changed** (+74 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/artifacts/apple/MachoLoadCommandReader.test.ts` (+21 -0) 📝 `src/artifacts/apple/MachoLoadCommandReader.ts` (+2 -1) 📝 `tests/boundary/cli/dylibResolutionCli.test.ts` (+51 -0) </details> ### 📄 Description ## Summary Preserve a leading U+FEFF when decoding NUL-terminated Mach-O load-command strings. It is part of the source name/path identity, not a text-file byte-order marker. Stripping it can change an install name and cause an unrelated dylib to appear to resolve. Original Mach-O change author: @1052326311. ## Scope This PR changes only Mach-O string decoding and its parser/CLI regressions. It sets `ignoreBOM: true` on the existing fatal UTF-8 decoder; load-command bounds, NUL termination, and invalid UTF-8 rejection remain intact. The focused parser regression covers LC_ID_DYLIB, LC_LOAD_DYLIB, LC_RPATH, and LC_DYLD_ENVIRONMENT. The CLI regression checks ordinary and U+FEFF-prefixed names and confirms that the prefixed identity does not resolve as the ordinary library. The historical calls-only reconstruction policy change raised in review is not part of this PR's current diff. It is already on the current base in commit `688defca0 fix(comparison): recheck historical calls-only changes (#2223)`, authored by Lucien (`164857476+dakjdakd@users.noreply.github.com`). ## Validation Maintenance review inspected the exact diff against current base, ran pinned Oxfmt 0.72.0 on the merge-conflict file, and ran `git diff --check`. Tests and builds were not run in this maintenance pass. The captured earlier CI run was for the pre-merge head and reported a formatting issue in `scripts/lib/clean-linux-hopper-runtime.mjs` plus reconstruction comparison failures; the format issue was corrected during the current-base merge, and the comparison behavior is now on the base. Current-head CI is queued/in progress. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 00:59:48 +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#5038
No description provided.