зеркало из https://github.com/github/ruby.git
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:
Родитель
85a1738ab3
Коммит
33edcc1120
|
@ -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);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче