[PR #5254] fix(macho): exact arm64e.x1 slice names and mach-o-universal format #6840

Open
opened 2026-11-01 21:43:26 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/5254
Author: @fp2s92d5pd-bit
Created: 10/19/2026
Status: 🔄 Open

Base: main ← Head: fix/macho-exact-slice-names-and-universal-format


📝 Commits (4)

  • aa998e6 fix(macho): surface exact arm64e.x1 slice names and the universal format
  • f38cf0a fix(macho): name the arm64e x1 subtype from the slice name
  • dff41f1 fix(dylib): accept the arm64e.x1 slice selector
  • e559dcb Merge remote-tracking branch 'origin/main' into HEAD

📊 Changes

7 files changed (+69 additions, -8 deletions)

View changed files

📝 src/artifacts/apple/MachoLoadCommandReader.test.ts (+12 -0)
📝 src/artifacts/apple/MachoLoadCommandReader.ts (+7 -5)
📝 src/cli/artifactCommands.ts (+1 -1)
📝 src/domain/apple/dylibResolution.test.ts (+15 -0)
📝 src/domain/apple/dylibResolution.ts (+1 -1)
📝 src/native/parsers/lipo.test.ts (+15 -0)
📝 src/native/parsers/lipo.ts (+18 -1)

📄 Description

Fixes #5191 (two of the three points; see below).

What changed

Exact slice names. architectureName collapsed CPU_SUBTYPE_ARM64E_X1 into the arm64e family, so inspect_macho.architectures and trace_dylib_resolution labels disagreed with lipo, which prints arm64e.x1. It now returns arm64e.x1 for the x1 subtype, arm64e for the pointer-auth base subtype, and arm64 otherwise. This matches the vocabulary already used by MACHO_ARCHITECTURE_POLICIES and the lipo parser.

Universal format. inspect_macho hard-coded format: "mach-o", while open_binary and binary_session report mach-o-universal for the same fat image. It now reports mach-o-universal when the image has more than one slice and mach-o otherwise, and the schema accepts both.

Platform codes. Not changed: BUILD_PLATFORM_NAMES in src/native/parsers/otool.ts already maps 7, 8, 9 and 12 to IOSSIMULATOR, TVOSSIMULATOR, WATCHOSSIMULATOR and VISIONOSSIMULATOR on main, so the 6.5.0 raw-code behaviour is already addressed upstream.

Tests

  • New: names the arm64e x1 slice exactly as lipo does (Mach-O load command reader).
  • npx vitest run src/artifacts/apple/MachoLoadCommandReader.test.ts src/native/NativeMachoInspection.test.ts → 47 files/tests passed (the reader file alone: 29 passed including the new one).
  • npx prettier --check on the changed files: clean. npx tsc --noEmit: clean.

Reported from macOS on Apple silicon while inspecting stock system binaries; not a request for new analysis capability.


🔄 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/5254 **Author:** [@fp2s92d5pd-bit](https://github.com/fp2s92d5pd-bit) **Created:** 10/19/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/macho-exact-slice-names-and-universal-format` --- ### 📝 Commits (4) - [`aa998e6`](https://github.com/morluto/rea/commit/aa998e69ff9c4829df9b3b683db46a18b2eb8650) fix(macho): surface exact arm64e.x1 slice names and the universal format - [`f38cf0a`](https://github.com/morluto/rea/commit/f38cf0a3ac7ef705e880b521808cd0038ce6ca29) fix(macho): name the arm64e x1 subtype from the slice name - [`dff41f1`](https://github.com/morluto/rea/commit/dff41f11d47a741549cebfec4651428241505bb8) fix(dylib): accept the arm64e.x1 slice selector - [`e559dcb`](https://github.com/morluto/rea/commit/e559dcbd19577ace5e756f0e095590ab52742246) Merge remote-tracking branch 'origin/main' into HEAD ### 📊 Changes **7 files changed** (+69 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `src/artifacts/apple/MachoLoadCommandReader.test.ts` (+12 -0) 📝 `src/artifacts/apple/MachoLoadCommandReader.ts` (+7 -5) 📝 `src/cli/artifactCommands.ts` (+1 -1) 📝 `src/domain/apple/dylibResolution.test.ts` (+15 -0) 📝 `src/domain/apple/dylibResolution.ts` (+1 -1) 📝 `src/native/parsers/lipo.test.ts` (+15 -0) 📝 `src/native/parsers/lipo.ts` (+18 -1) </details> ### 📄 Description Fixes #5191 (two of the three points; see below). ## What changed **Exact slice names.** `architectureName` collapsed `CPU_SUBTYPE_ARM64E_X1` into the `arm64e` family, so `inspect_macho.architectures` and `trace_dylib_resolution` labels disagreed with `lipo`, which prints `arm64e.x1`. It now returns `arm64e.x1` for the x1 subtype, `arm64e` for the pointer-auth base subtype, and `arm64` otherwise. This matches the vocabulary already used by `MACHO_ARCHITECTURE_POLICIES` and the lipo parser. **Universal format.** `inspect_macho` hard-coded `format: "mach-o"`, while `open_binary` and `binary_session` report `mach-o-universal` for the same fat image. It now reports `mach-o-universal` when the image has more than one slice and `mach-o` otherwise, and the schema accepts both. **Platform codes.** Not changed: `BUILD_PLATFORM_NAMES` in `src/native/parsers/otool.ts` already maps `7`, `8`, `9` and `12` to `IOSSIMULATOR`, `TVOSSIMULATOR`, `WATCHOSSIMULATOR` and `VISIONOSSIMULATOR` on main, so the 6.5.0 raw-code behaviour is already addressed upstream. ## Tests - New: `names the arm64e x1 slice exactly as lipo does` (Mach-O load command reader). - `npx vitest run src/artifacts/apple/MachoLoadCommandReader.test.ts src/native/NativeMachoInspection.test.ts` → 47 files/tests passed (the reader file alone: 29 passed including the new one). - `npx prettier --check` on the changed files: clean. `npx tsc --noEmit`: clean. Reported from macOS on Apple silicon while inspecting stock system binaries; not a request for new analysis capability. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#6840
No description provided.