> Take a backward may_goto whose grown offset is exactly -32768 (S16_MIN). [...] > Should the JEQ-or-gotol decision be deferred until the final offsets are > known?
This is a real regression, and it is wider than one displacement: any backward may_goto whose offset fits in s16 before the patches between its target and itself are applied, but not after, now gets a JEQ and fails at commit. Those patches are already queued when the loop reaches the may_goto, so v2 will add their growth to the offset before may_goto_expand() picks the encoding, which gives the old choice, and add a selftest around the boundary.

