summaryrefslogtreecommitdiff
path: root/zjit/src
diff options
context:
space:
mode:
authorMax Bernstein <[email protected]>2025-05-15 16:55:38 -0400
committerAaron Patterson <[email protected]>2025-05-15 15:31:02 -0700
commit6b10d40157b5287cd13169437800343165eae949 (patch)
tree8867be142f770b866abe9e1b39d1cafba9359cc6 /zjit/src
parentd67d169aeae8b05f8b06f4829de6d5f14059cfea (diff)
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.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13356
Diffstat (limited to 'zjit/src')
-rw-r--r--zjit/src/codegen.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/zjit/src/codegen.rs b/zjit/src/codegen.rs
index d9d4d6ba18..24dbd30e70 100644
--- a/zjit/src/codegen.rs
+++ b/zjit/src/codegen.rs
@@ -126,6 +126,9 @@ fn gen_iseq_entry_point(iseq: IseqPtr) -> *const u8 {
asm.ccall(callee_addr, vec![]);
});
branch_iseqs.extend(callee_branch_iseqs);
+ } else {
+ // Failed to compile the callee. Bail out of compiling this graph of ISEQs.
+ return std::ptr::null();
}
}