#330 ag-baked-reloc-width wrong for KIND-8 (returns 4, but loader patches u64/8 bytes)

open
Opened by atgreen

Found by codex during A2 Stage C review. Pre-existing, currently dormant (KIND-8 = the flag-off imm64 path, unreachable now that the linkage table defaults on), but real.

ag-baked-reloc-width (src/cold/cold-fco.lisp:132) returns 8 only for KIND-2 and KIND-6, else 4. But the loader patches KIND-8 as a u64 (patch-u64-at, 8 bytes) — cold-loader.lisp:381/430. So the serializer zero-pass (ag-fco-zero-baked-relocs- walk, cold-fco.lisp:108) zeroes only 4 of the 8 imm64 bytes for a KIND-8 site, so the fasl leaks the producer absolute upper 4 bytes. Functionally masked today (the loader patch-u64-at overwrites all 8 on load), but the fasl is not fully producer-independent for KIND-8, and this WILL bite if the KIND-8/imm64 fallback is revived or retired carelessly (Stage C).

Fix: ag-baked-reloc-width should return 8 for KIND-8 too. (KIND-9, the live path, is a 4-byte disp32, correctly 4.)

Related: #319 (A2 Stage C).

Comments (0)

No comments yet.