Repository navigation
Conversation
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 overlapping
entry_*wrapper can emit continuations that its containing function never decoded, leaving a suspended guest thread with no registered return address. A newly registered alias can also occupy an explicit SDK handler address, and unordered owner iteration can choose different wrappers for the same alias.Collect each decoded wrapper's own in-range continuations. Preserve #271's existing external-target policy: standalone entries can promote valid branches into other functions, while nested wrappers suppress duplicate external promotion. Register explicit recompiled/stub/syscall/library starts before aliases, then choose alias owners deterministically: ordinary functions first, followed by the most specific start within each kind.
This builds on #271: standalone entry continuations and external branches remain supported, and its regression stays in place. Nested wrappers also collect their own continuations before the existing interval classification controls external promotion.
Regression cases use synthetic ELFs and the existing test infrastructure, with no game files. They cover nested JAL/JALR/syscall continuations, standalone external branch registration and matching resume labels, explicit handler collisions, overlapping owners, reversed owner insertion, and the existing standalone-entry case. The full-pipeline fixture runs separate serial, separate two-worker, and combined output.
Validation: native Windows x64, Visual Studio 2022/MSVC 19.44. Rebuilt the PR's recompiler and dependency libraries, then ran all 87 existing/new code-generator and recompiler MiniTest cases through a focused scratch runner: all passed. The exact upstream source at
2c5fbb9passes 84/87, reproducing all three residual issues. The original PR revision3b878b7passes 86/87, demonstrating the legitimate standalone branch that its blanket entry guard incorrectly omitted. That guard and the original negative test assertion have been corrected. CTest 3/3 passed, including both expected-failure controls. The complete runtime test executable and Linux builds were not run for this focused change.The change originated while restoring native King's Field IV audio, where missing generated continuations prevented the original guest driver/movie paths from returning. The full game integration is in Holyland #7, retaining its pinned patch series. This PR contains only the reusable generator fix and its tests.