From: "steviejj (Steven Johnstone) via ruby-core" Date: 2026-11-26T16:44:47+00:00 Subject: [ruby-core:127737] [Ruby Bug#22646] parse.y: `argument stack underflow (-1)` on Braceless Hash Under `# shareable_constant_value: experimental_copy` Issue #22646 has been reported by steviejj (Steven Johnstone). ---------------------------------------- Bug #22646: parse.y: `argument stack underflow (-1)` on Braceless Hash Under `# shareable_constant_value: experimental_copy` https://bugs.ruby-lang.org/issues/22646 * Author: steviejj (Steven Johnstone) * Status: Open * ruby -v: ruby 4.1.0dev (2026-11-26T13:52:03Z HEAD 17eecca74a) +PRISM [aarch64-linux] * Backport: 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- Differential fuzzer (prism vs parse.y) find. ```ruby # shareable_constant_value: experimental_copy while e B = [[[g: []]]] end ``` ```bash ruby --parser=parse.y --disable-gems -e 'RubyVM::InstructionSequence.compile("#shareable_constant_value:experimental_copy\nwhile e\nB=[[[g:[]]]]end\n")' ``` ## Observed Output ```text -- raw disasm-------- trace: 1 0000 jump ( 2) [sp: 0, unremovable: 1, refcnt: 1] 0002 putnil ( 2) [sp: 1, unremovable: 0, refcnt: 1] 0003 pop ( 2) 0004 jump ( 2) [sp: 0, unremovable: 1, refcnt: 6] trace: 1 0006 putspecialobject 1 ( 3) 0008 newarray 1 ( 3) 0010 newarray 1 ( 3) 0012 newarray 1 ( 3) 0014 opt_send_without_block ( 3) 0016 putspecialobject 3 ( 3) * 0018 setconstant :B ( 3) [sp: 0, unremovable: 0, refcnt: 2] 0020 putself ( 2) 0021 opt_send_without_block ( 2) 0023 branchif ( 2) adjust: [label: 4] 0025 putnil ( 2) [sp: -1, unremovable: 0, refcnt: 4] 0026 leave ( 3) --------------------- : :3: argument stack underflow (-1) (SyntaxError) ``` -- 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/