Skip to content

Commit 83d7222

Browse files
committed
add padding to all side exit blocks
1 parent 3b1dd30 commit 83d7222

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

zjit/src/backend/lir.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2225,6 +2225,11 @@ impl Assembler
22252225
fn compile_exit(asm: &mut Assembler, exit: &SideExit) {
22262226
let SideExit { pc, stack, locals } = exit;
22272227

2228+
// Side exit blocks are not part of the CFG at the moment,
2229+
// so we need to manually ensure that patchpoints get padded
2230+
// so that nobody stomps on us
2231+
asm.pad_patch_point();
2232+
22282233
asm_comment!(asm, "save cfp->pc");
22292234
asm.store(Opnd::mem(64, CFP, RUBY_OFFSET_CFP_PC), *pc);
22302235

0 commit comments

Comments
 (0)