Branch: refs/heads/blead
Home: https://github.com/Perl/perl5
Commit: d0d82f50bd6d895b86607b19787ff59f9de7d18c
https://github.com/Perl/perl5/commit/d0d82f50bd6d895b86607b19787ff59f9de7d18c
Author: David Mitchell <[email protected]>
Date: 2026-02-19 (Thu, 19 Feb 2026)
Changed paths:
M pp_ctl.c
M t/op/goto_xs.t
Log Message:
-----------
goto: impose scalar context on XSUB return values
GH #24212
In something like
my $ret = an_xsub();
pp_entersub() itself, since 5.001, imposes scalar context if necessary
on the return value(s) from the XSUB: by popping all but the top item in
the return list, or pushing undef if none.
However for this:
sub wrap { goto an_xsub(); }
my $ret = wrap();
pp_goto() hasn't been doing the same, resulting in stack underflow or
the wrong number args returned etc. Somehow no one noticed this for 32
years.
This commit fixes that by more or less copying the XSUB scalar context
fixup code as-is from pp_entersub() to pp_goto().
Commit: 34f84ef118cf4d76aad5b6ead3a2a7ec3cc9f00d
https://github.com/Perl/perl5/commit/34f84ef118cf4d76aad5b6ead3a2a7ec3cc9f00d
Author: David Mitchell <[email protected]>
Date: 2026-02-19 (Thu, 19 Feb 2026)
Changed paths:
M pod/perldelta.pod
Log Message:
-----------
perldelta for GH #24212 fix
Compare: https://github.com/Perl/perl5/compare/ea3929892a0a...34f84ef118cf
To unsubscribe from these emails, change your notification settings at
https://github.com/Perl/perl5/settings/notifications