Skip to content

Commit 6b10d40

Browse files
tekknolagitenderlove
authored andcommitted
ZJIT: Bail out of recursive compilation if we can't compile callee
Right now we just crash if we can't compile an ISEQ for any reason (unimplemented in HIR, unimplemented in codegen, ...) and this fixes that by bailing out.
1 parent d67d169 commit 6b10d40

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

zjit/src/codegen.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ fn gen_iseq_entry_point(iseq: IseqPtr) -> *const u8 {
126126
asm.ccall(callee_addr, vec![]);
127127
});
128128
branch_iseqs.extend(callee_branch_iseqs);
129+
} else {
130+
// Failed to compile the callee. Bail out of compiling this graph of ISEQs.
131+
return std::ptr::null();
129132
}
130133
}
131134

0 commit comments

Comments
 (0)