Commit Graph
5 Commits
Author SHA1 Message Date
robbie d995f6223d fix(codegen): reject 16-bit branches into a rewritten instruction
Operand-size-prefixed (0x66) relative branches are classified as having
no branch target, so the AdjustedDelta check never saw them. The
truncated-branch guard only checked whether the branch and its target
move apart, so `66 EB 01 B8 11 22 33 44 C3` rewritten at offset 3 was
accepted and the branch landed in the middle of the new bytes.

Reject a truncated branch whose target is inside the cut, and run that
check for same-length rewrites too, matching the rel8/rel32 path.
2026-10-27 05:15:16 +00:00
cocoa55 dfc705eb41 fix(codegen): reject branches into a rewritten instruction 2026-10-24 13:46:52 +00:00
Adrià FranchandClaude Sonnet 5.5 e1fea2ebc8 fix(relinker): drop stray blank line and document the moving-branch guard
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-24 10:58:12 +02:00
Yaash Singhh f5fbf2f98d fix(relinker): rebase truncated branch guard onto current main 2026-10-24 10:58:00 +02:00
MrMha e5c280fed4 fix(codegen): reject rewrites inside instructions 2026-10-11 19:56:00 +04:00