Branch: refs/heads/davem/goto_xsub
Home: https://github.com/Perl/perl5
Commit: afb1c797c72c2f576105431f2dc5f323d4cc6d4a
https://github.com/Perl/perl5/commit/afb1c797c72c2f576105431f2dc5f323d4cc6d4a
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: 83e8a0dfb82ba90d416c61869e667cd08aebdca5
https://github.com/Perl/perl5/commit/83e8a0dfb82ba90d416c61869e667cd08aebdca5
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/a38e38cd46dc...83e8a0dfb82b
To unsubscribe from these emails, change your notification settings at
https://github.com/Perl/perl5/settings/notifications