Files
BFM-decomp/phase-ends/current/logs/T3.c8.md
T

1.8 KiB

T3.c8 — kept-macro carry survives a respelled nested base

  • Cause confirmed (ledger): t3_S13 row func_8017EA20 had KEPT(NON-STRUCT) off 18, lines 3954/3958, base nested:*(s32 *)(*(s32 *)(param_1 + 0x64) + 0x20); t3_S28 (MEMBERS) respelled the inner deref to ((Unkstruct_800B5CB8 *)param_1)->unk64 and lines shifted to 3953/3957 → c4 carry (s_macro_rows, match = same off and (same base or same line)) found neither.
  • Fix tools/restruct.py: s_base_norm(key) (:1191-1203) normalises *(T *)(X + 0xNN) and ((S *)X)->unkNN to @[X+NN] innermost-first; s_macro_rows match adds or s_base_norm(prior base) == s_base_norm(census base) (:1227-1230). Off still must match.
  • Selftest (:4823-4834): fx_f CAST_NONSTRUCT(u16, *(s32 *)(((Unkstruct_TEST *)a0)->unk4 + 0x20), 0x12), prior t3_S13 row keyed *(s32 *)(*(s32 *)(a0 + 0x4) + 0x20) on line 999 → carried, unbacked 0. Scratch check: a different inner offset (0x8 vs unk4) does not normalise equal.
  • Ledger repair (no src edit, no --apply): .run/t3c8/repair.py — copy of the latest S row for the body, its macro_of entries dropped, s_macro_rows re-run on the current file text (label kept t3_S28 during carry for provenance), relabelled t3c8_repair, appended via ledger_append. Row MEMBERS, 39 sites; macro_of: KEPT(SIGN) 3919 t3_S28, KEPT(WIDTH) 3931 t3_S28, KEPT(NON-STRUCT) 3953/3957 t3_S13.
  • Scan for other bodies in this state: check-casts after repair reports unbacked 0 → none.

Verified

  • restruct.py --selftest → 96/96 OK
  • restruct.py --check-ledger → rc 0, 0 violations
  • restruct.py --rung S --check-residue --only "ov_*" → uncovered 0 sites / 0 bodies
  • type_census.py --check-casts --quiet → (unbacked 0) (raw P/I/X/M nonzero as expected)
  • git status --short src include → empty