Skip to content

Conversation

@iabyn
Copy link
Contributor

@iabyn iabyn commented Jan 20, 2025

GH #22710

The experimental refassign feature, @A = $aref, which allows an array/hash etc to be aliased rather than copied, got broken in rvalue non-void context by v5.39.5-56-g604c0355d2. So in something like

my $x = (\@a = $aref);

the stack was underflowing. This is because previously pp_refassign() would leave its RH argument on the stack when returning, while my commit above made it always pop the argument off the stack.

This commit makes it only pop the arg in void context.

  • This set of changes requires a perldelta entry, but is not written yet

GH #22710

The experimental refassign feature, \@A = $aref, which allows an
array/hash etc to be aliased rather than copied, got broken in rvalue
non-void context by v5.39.5-56-g604c0355d2. So in something like

    my $x = (\@A = $aref);

the stack was underflowing. This is because previously pp_refassign()
would leave its RH argument on the stack when returning, while my commit
above made it always pop the argument off the stack.

This commit makes it only pop the arg in void context.
@iabyn iabyn merged commit 53119a6 into blead Jan 22, 2025
@iabyn iabyn deleted the davem/gh22710 branch January 22, 2025 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants