diff options
author | Jimmy Miller <jimmy.miller@shopify.com> | 2023-03-21 12:57:26 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-21 12:57:26 -0400 |
commit | 5de26bc0319d8b0de315cb90e68345a816673fa6 (patch) | |
tree | eaa139a38a1d1b24c96dc2fa92f781abda41ffb7 /yjit/src/codegen.rs | |
parent | f62fa5128301f07352b215ef118fa5264800ad0b (diff) | |
download | ruby-5de26bc0319d8b0de315cb90e68345a816673fa6.tar.gz |
YJIT: Fix incorrect exit in splat (#7575)
So by itself, this shouldn't have been a correctness issue, but we
also pop the stack for block_args. Doing stack manipulation like that
and then side-exiting causes issues. So, while this fixes the
immediate failure, we have a bigger issue with block_args popping and
then exiting that we need to deal with.
Diffstat (limited to 'yjit/src/codegen.rs')
-rw-r--r-- | yjit/src/codegen.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/yjit/src/codegen.rs b/yjit/src/codegen.rs index d0fd439264..824415346e 100644 --- a/yjit/src/codegen.rs +++ b/yjit/src/codegen.rs @@ -5708,7 +5708,7 @@ fn gen_send_iseq( unsafe { rb_yjit_array_len(array) as u32} }; - if opt_num == 0 && required_num != array_length as i32 { + if opt_num == 0 && required_num != array_length as i32 + argc - 1 { gen_counter_incr!(asm, send_iseq_splat_arity_error); return CantCompile; } |