Avoid opt_aset_with optimization inside multiple assignment

Previously, since the opt_aset_with optimization was introduced,
use of the opt_aset_with optimization inside multiple assignment
would result in a segfault or incorrect instructions.

Fixes [Bug #21012]

Co-authored-by: Nobuyoshi Nakada <nobu.nakada@gmail.com>
This commit is contained in:
Jeremy Evans 2025-01-08 08:49:51 -08:00 committed by GitHub
parent e728170043
commit e0d600ec19
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
Notes: git 2025-01-08 16:50:14 +00:00
Merged: https://github.com/ruby/ruby/pull/12528

Merged-By: jeremyevans <code@jeremyevans.net>
3 changed files with 16 additions and 1 deletions

1
iseq.h
View file

@ -119,6 +119,7 @@ struct iseq_compile_data {
struct iseq_compile_data_storage *storage_current;
} insn;
bool in_rescue;
bool in_masgn;
int loopval_popped; /* used by NODE_BREAK */
int last_line;
int label_no;