Add pushtoarray insn to fix segfault with forwarding + splat#15855
Merged
tenderlove merged 1 commit intoruby:masterfrom Jan 13, 2026
Merged
Add pushtoarray insn to fix segfault with forwarding + splat#15855tenderlove merged 1 commit intoruby:masterfrom
tenderlove merged 1 commit intoruby:masterfrom
Conversation
8f24e66 to
6abc659
Compare
Earlopain
reviewed
Jan 13, 2026
Contributor
|
Can you also update the comment above to include the forwarding case? Otherwise this looks OK to me. cc @kddnewton (https://bugs.ruby-lang.org/issues/21832) |
5566d9e to
70626fb
Compare
Example insns diff for `def x = [3]; def a(...) = b(*x, 2, 3, ...)`
== disasm: #<ISeq:a@-e:1 (1,13)-(1,42)>
local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
[ 1] "..."@0
0000 putself ( 1)[Ca]
0000 putself
0000 opt_send_without_block <calldata!mid:x, argc:0, FCALL|VCALL|ARGS_SIMPLE>
0000 splatarray true
0000 putobject 2
0000 putobject 3
+0000 pushtoarray 2
0000 getlocal_WC_0 "..."@0
0000 sendforward <calldata!mid:b, argc:1, ARGS_SPLAT|ARGS_SPLAT_MUT|FCALL|FORWARDING>, nil
0000 leave [Re]
This matches the insns produced by parse.y
70626fb to
638aea1
Compare
This was referenced Jan 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Example insns diff for
def x = [3]; def a(...) = b(*x, 2, 3, ...)This matches the insns produced by parse.y