Skip to content

Select TP6 procedures from bounded TPU9 entry metadata - #3

Merged
janrysavy merged 1 commit into
mainfrom
review/tpu-entry-bounds-20260925
Sep 25, 2026
Merged

janrysavy merged 1 commit into
mainfrom
review/tpu-entry-bounds-20260925

Conversation

@janrysavy

Copy link
Copy Markdown
Owner

A real TP6 filename reconstruction places the ShortString literal 01 4C before 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.

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.
@janrysavy
janrysavy merged commit 0686207 into main Sep 25, 2026
1 check passed
@github-actions
github-actions Bot deleted the review/tpu-entry-bounds-20260925 branch September 25, 2026 19:01
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