Skip to content

Commit a5119a3

Browse files
jhawthornXrXr
authored andcommitted
YJIT: Add missing prepare before calling str_dup
1 parent 50a3463 commit a5119a3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

yjit/src/codegen.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6123,7 +6123,7 @@ fn jit_rb_str_to_s(
61236123
}
61246124

61256125
fn jit_rb_str_dup(
6126-
_jit: &mut JITState,
6126+
jit: &mut JITState,
61276127
asm: &mut Assembler,
61286128
_ci: *const rb_callinfo,
61296129
_cme: *const rb_callable_method_entry_t,
@@ -6137,6 +6137,8 @@ fn jit_rb_str_dup(
61376137
}
61386138
asm_comment!(asm, "String#dup");
61396139

6140+
jit_prepare_call_with_gc(jit, asm);
6141+
61406142
// Check !FL_ANY_RAW(str, FL_EXIVAR), which is part of BARE_STRING_P.
61416143
let recv_opnd = asm.stack_pop(1);
61426144
let recv_opnd = asm.load(recv_opnd);

0 commit comments

Comments
 (0)