ZJIT: Make sure to add a LIR basic block in compile failure entrypoint (#15932)

We need to add a dummy block for this stub otherwise it won't be able to
push any instructions. Without this, `--zjit-stats` is broken.
This commit is contained in:
Max Bernstein 2026-01-22 12:35:11 -05:00 committed by GitHub
parent a7a0c36b20
commit fd7bf518a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
Notes: git 2026-01-22 17:35:39 +00:00
Merged-By: tekknolagi <donotemailthisaddress@bernsteinbear.com>

View File

@ -2899,6 +2899,7 @@ fn gen_string_append_codepoint(jit: &mut JITState, asm: &mut Assembler, string:
/// Generate a JIT entry that just increments exit_compilation_failure and exits
fn gen_compile_error_counter(cb: &mut CodeBlock, compile_error: &CompileError) -> Result<CodePtr, CompileError> {
let mut asm = Assembler::new();
asm.new_block_without_id();
gen_incr_counter(&mut asm, exit_compile_error);
gen_incr_counter(&mut asm, exit_counter_for_compile_error(compile_error));
asm.cret(Qundef.into());