Skip to content

Reject incompatible thread-slot rewrites on Apple hosts - #2

Draft
thehobbit85 wants to merge 1 commit into
mainfrom
codex/port-01-rewrite-abi
Draft

thehobbit85 wants to merge 1 commit into
mainfrom
codex/port-01-rewrite-abi

Conversation

@thehobbit85

@thehobbit85 thehobbit85 commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

An Android module can reach the Apple loader with a valid layout header. The two native hosts read thread state through different ARM registers. An attempt to run the Android rewrite on Apple previously passed the layout check.

Reject a nonzero TP_SLOT when reading the module header, before mapping it. Apple modules produced before this check still load. The marker matches the Android fork.

Checked

  • The synthetic loader regression failed on the parent and passed on this branch. It exercises both a valid legacy Apple header and that same header with the Android marker.
  • The full Mac host suite passed for profile 0100633007D48000. All 11 documentation tests passed.
  • The only local Mac game build is Pokémon Legends: Z-A. The pinned Metal regression stopped before comparison because the installed Metal compiler is 32023.921 and the lock requires 32023.922. With the repository’s compiler override enabled for both revisions, the full shader comparison passed. The profile has no smoke route, so this report covers shaders only. The full Mac GPU unit suite also passed.

First PR in the native-port stack. The offline Android rewriter builds on this guard. Merge this PR first.

Regression report

regress.py check (full): PASS

Baseline fork/main 65501fb, candidate codex/port-01-rewrite-abi 09472c2; Apple M2 Max, macOS 26.6, Xcode 27.0; 1054.9 s

game status shaders (base → cand) newly failing newly building changed MSL interface (new / known) boot fps p50 frame p99 ms peak MB prepare s new RED
LegendsZA 0100F43008C44000 PASS 28603/28603 → 28603/28603 0 0 0 0 / 0 – – – – – –

LegendsZA 0100F43008C44000: PASS

  • time: chain 1054.7 s

CI on the base

The clang-tidy job reports a nullable readback buffer and a retained program in dm/gfx/tests/t_geometry_hazards.m. This PR does not change that fixture. Upstream PR 979 addresses those findings separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants