Skip to content

Workflow: sync with upstream automatically - #4

Open
zenvyzenshiro wants to merge 1 commit into
mainfrom
auto-sync-workflow
Open

zenvyzenshiro wants to merge 1 commit into
mainfrom
auto-sync-workflow

Conversation

@zenvyzenshiro

Copy link
Copy Markdown
Owner

Adds .github/workflows/sync-upstream.yml (every 6 hours, or Actions > Sync upstream > Run workflow).

It merges seedds/nxnative main into auto-sync-upstream, then applies what each sync needed so far: README.md and .github/ stay the fork's, dmsh_chain.h is regenerated, and a dmsh_xlate.dll that Windows x64 cannot load (arm64 PE) is rebuilt from source with the lock following. It runs win/tests/test_win.py, opens (or updates) a PR, and merges it when the tests pass. Set the Actions variable AUTO_MERGE=false to merge by hand. A conflict it does not know opens an issue instead.

Not covered: --check-tools and IPA builds (no Metal tools on the runner).

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
john62036203-ops pushed a commit to john62036203-ops/NXNativeWindows that referenced this pull request Nov 7, 2026
…d jump_adr_offsets took the nearest cmp of the index, whatever followed it (issue seedds#977, PR seedds#1515)

guarded_count takes a compare only when, between it and the table load, the first branch on an unsigned condition comes with the compare's flags still in place: b.hi out of the dispatch reads N + 1 entries, b.hs / b.cs N (read as N + 1 before), b.ls / b.lo into it the same counts when the instruction before its target ends the path that failed. A compare with no such branch only sets the flags and the walk goes on to the check before it; with none the site is refused. Before, `cmp w18,zenvyzenshiro#4; b.hi exit; cmp w18,zenvyzenshiro#1; ldrsw ...` read 2 entries of a table of 5 with no error.

Checked (by the author): 165 sites of 27 modules of 6 games, all cmp; b.hi, rewritten byte-identically; GuardedCheck, 8 cases, 7 failing before. Checked here, as seedds#977 asks before a stricter rule goes in: 35 modules of 12 games on the T7 (Cuphead, Three Houses, Minecraft Dungeons II, Octopath Traveler 0 and II, Okami HD, Sonic Superstars, Ocarina of Time, DK Bananza, Mario Tennis Fever, Pokopia, Splatoon Raiders) rewrite byte-identically before and after, and so do Super Smash Bros. Ultimate 13.0.5, Mario Kart 8 Deluxe and Super Mario Odyssey's main, sdk and subsdk0 (against origin/main, with the page-zero rule of the commit before); test_jump_copies 75 OK, lint_python 0 new, test_docs. No regress.py run: no module that rewrote before changes. Modules with b.hs or a branch into the dispatch are still tested only synthetically.

Co-authored-by: Atomsk-debug <135618857+Atomsk-debug@users.noreply.github.com>
KillingStalking pushed a commit to KillingStalking/NXNativeWindows that referenced this pull request Nov 13, 2026
The walk from the load back to the bounds check noticed copies and masks but no
other write: cmp w18,zenvyzenshiro#4; b.hi; add w18,w18,#1; ldrsw x18,[x4,x18,lsl zenvyzenshiro#2] read
entries 0 to 4 while the code uses 1 to 5, so one case's target was missing with
no sign of it. A site with a write of the index after its check, or a call with
a caller-saved index, is now refused, as jump_adr_offsets and half_count already
refuse a write. A refusal goes on to the other recognizers and ends in the jump
table assertion. Writes before the check do not count, which keeps the sites
check_before_copy takes.

A write that keeps the value, such as sxtw x0,w0, is refused too; no module on
the drive has one.

Checked: test_jump_copies.py (the new cases fail on the previous rewriter). Of the
345 unique modules on the drive, old and new recognition are the same on 281, and
60 more mains were scanned on the previous code with no site this refuses. That
includes Smash 13.0.5, EA SPORTS FC 27 and Well Dweller. Four could not be checked:
New Super Mario Bros. U Deluxe's main, sdk and rtld fail alike (no profile), and
Smash 1.0.0's main stops at a table the game's note already lists. No regress.py
run: nothing changes in the modules checked.
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.

1 participant