YJIT: Protect strings from GC on String#<< (#7466)
Fix https://github.com/Shopify/yjit/issues/310 [Bug #19483] Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> Co-authored-by: Jimmy Miller <jimmy.miller@shopify.com>
This commit is contained in:
parent
85a1738ab3
commit
33edcc1120
Notes:
git
2023-03-07 21:10:28 +00:00
Merged-By: maximecb <maximecb@ruby-lang.org>
@ -4288,6 +4288,9 @@ fn jit_rb_str_concat(
|
||||
// Guard that the argument is of class String at runtime.
|
||||
let arg_type = ctx.get_opnd_type(StackOpnd(0));
|
||||
|
||||
// Guard buffers from GC since rb_str_buf_append may allocate.
|
||||
gen_save_sp(asm, ctx);
|
||||
|
||||
let concat_arg = ctx.stack_pop(1);
|
||||
let recv = ctx.stack_pop(1);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user