From: "k0kubun (Takashi Kokubun) via ruby-core" Date: 2025-02-14T05:08:59+00:00 Subject: [ruby-core:121021] [Ruby master Bug#21012] Compiling `a['a','b'],=1` with parse.y fails Issue #21012 has been updated by k0kubun (Takashi Kokubun). Backport changed from 3.1: REQUIRED, 3.2: DONE, 3.3: DONE, 3.4: REQUIRED to 3.1: REQUIRED, 3.2: DONE, 3.3: DONE, 3.4: DONE ruby_3_4 commit:3fdf7279a0b1ac35fdf233464a93b3d268133d5a merged revision(s) commit:e0d600ec190c64aff76cfcbd6009cffb927da166. ---------------------------------------- Bug #21012: Compiling `a['a','b'],=1` with parse.y fails https://bugs.ruby-lang.org/issues/21012#change-111929 * Author: tompng (tomoya ishida) * Status: Closed * ruby -v: ruby 3.5.0dev (2025-01-06T01:50:53Z master c8e3d745fa) [x86_64-linux] * Backport: 3.1: REQUIRED, 3.2: DONE, 3.3: DONE, 3.4: DONE ---------------------------------------- Compiling this code with parse.y fails with segmentation fault. ~~~ruby a['a','b'],=1 ~~~ Compiling `a['a',x],=1` generates instruction sequence that wrong contains `opt_aset_with`. ~~~ $ ruby --parser=parse.y --dump=insn -e "a['a',999],=1" == disasm: #@-e:1 (1,0)-(1,13)> 0000 putself ( 1)[Li] 0001 opt_send_without_block 0003 putobject_INT2FIX_1_ 0004 dup 0005 expandarray 1, 0 0008 topn 1001 .... 2006 topn 1001 2008 topn 1000 2010 opt_aset_with "a", 2013 setn 1000 2015 pop .... 3014 pop 3015 leave ~~~ -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/