This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #40557] regexec.c saves context stack position improperly
[perl5.git] / regexec.c
index 30dd354..c4d88cc 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -2094,7 +2094,7 @@ S_regtry(pTHX_ const regmatch_info *reginfo, char *startpos)
            PerlIO_printf(Perl_debug_log, "  setting stack tmpbase at %"IVdf"\n",
                          (IV)(PL_stack_sp - PL_stack_base));
            ));
-       SAVEI32(cxstack[cxstack_ix].blk_oldsp);
+       SAVESTACK_CXPOS();
        cxstack[cxstack_ix].blk_oldsp = PL_stack_sp - PL_stack_base;
        /* Otherwise OP_NEXTSTATE will free whatever on stack now.  */
        SAVETMPS;