Repository navigation
Preserve interrupt ownership across AOT tail fallbacks - #194
Merged
mstan merged 1 commit intoOct 21, 2026
Merged
Conversation
mstan
approved these changes
Oct 21, 2026
mstan
left a comment
Member
There was a problem hiding this comment.
Reviewed ownership ordering: interpreter bounce ownership must win, and only an unpaired interrupt root may run to RTI. Near/far subroutines retain balanced fallback. The production bridge regression and existing bridge harness pass.
Validation: five-head integration passed 826 Python tests (2 skipped) and 109 Rust tests. After excluding #198 for its separate title-save compatibility blocker, the four-head combination passed all 69 focused tests. Linux, Windows, macOS and Lua CI are green for this reviewed head. No new cross-title gameplay playtest is claimed.
This was referenced Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An unresolved tail from an AOT subroutine running inside NMI/IRQ currently enters a fresh interrupt interpreter before checking whether an existing interpreter owns the continuation. That nested run consumes the caller's continuation and RTI, then returns to compiled code with a guest stack that has already unwound.
Check the interpreter bounce owner first, and only select interrupt-root execution when there is no paired RTS/RTL return frame (
hrv == 0). Near and far subroutines retain the existing balanced fallback, including indirect-dispatch handling.Validation:
python -m pytest tests/test_interrupt_tail.py -q: 2 passed, covering the new fixture and the existing bridge contract harness.This was extracted from ISSD Native bring-up and adapted to current main (
0788387). No commercial ROM, generated game source, frame scheduling changes, or game-specific addresses are required. Cross-title gameplay qualification is left to the maintainers; this PR establishes the synthetic ownership contract.