My recent merge commit v5.31.3-198-gd2cd363728 (temporarily reverted by
v5.31.4-0-g20ef288c53) added a si_cxsubix field to the stackinfo struct
to track the most recent sub context. This field wasn't being restored
correctly with 'goto &XS-sub', and broke Test::Deep.
* this is a cx_popblock(), less all the stuff we already did
* for cx_topblock() earlier */
PL_curcop = cx->blk_oldcop;
+ /* this is cx_popsub, less all the stuff we already did */
+ PL_curstackinfo->si_cxsubix = cx->blk_sub.old_cxsubix;
+
CX_POP(cx);
/* Push a mark for the start of arglist */
use warnings;
use strict;
-plan tests => 124;
+plan tests => 125;
our $TODO;
my $deprecated = 0;
};
};
is $@,'', 'goto the first parameter of a binary expression [perl #132854]';
+
+# v5.31.3-198-gd2cd363728 broke this. goto &XS_sub wasn't restoring
+# cx->blk_sub.old_cxsubix. Would panic in pp_return
+
+{
+ # isa is an XS sub
+ sub g198 { goto &UNIVERSAL::isa }
+
+ sub f198 {
+ g198([], 1 );
+ {
+ return 1;
+ }
+ }
+ eval { f198(); };
+ is $@, "", "v5.31.3-198-gd2cd363728";
+}