Repository navigation
Select TP6 procedures from bounded TPU9 entry metadata - #3
Merged
Merged
Conversation
Real compiler output can place a Pascal literal pool before a procedure in the same code block. A whole-section instruction sweep consumes the BP prologue as literal operands and misses the routine. Provide one shared metadata reader for reconstruction clients, with strict table/entry/block bounds and no raw-search fallback. The earliest local entry must itself have the expected frame. A later carrier cannot replace an invalid primary or supply its missing RET. Document the single-epilogue scope. Add 31 synthetic controls without vendor/game payloads; all 228 tests pass locally with 36 licensed-corpus tests skipped. All 21 currently registered parent TPU routine extents agree with the new reader.
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.
A real TP6 filename reconstruction places the ShortString literal
01 4Cbefore its procedure. Linear decoding from the beginning of the code section consumes the following prologue as literal operands and misses the valid entry. The previous client helper could also accept a missing return by reading into an adjacent carrier block.Add a dependency-free shared TPU9 code-geometry reader: validated entry/block tables, block-relative selectors and offsets, alias handling, exact section extent, and procedure spans bounded by the next entry and owning block. Select the earliest declared BP-framed procedure; never substitute a later carrier or fall back to raw byte search. Decode a complete RET/RETF only within that span.
Scope is explicitly controlled, single-epilogue TP6 probes—not arbitrary multi-return assembly or a complete symbol/relocation reader.
Validation: 31 new synthetic positive/adversarial controls; full local suite 228 passed, 36 licensed-corpus tests skipped. All 21 currently registered parent TPU extents agree. No vendor compiler or game bytes are added. The dependent parent/dostools client changes will use the merged pin after final-head CI passes.