This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pp_return: avoid potential CX stack realloc prob
authorDavid Mitchell <davem@iabyn.com>
Fri, 16 Oct 2015 10:33:43 +0000 (11:33 +0100)
committerDavid Mitchell <davem@iabyn.com>
Wed, 3 Feb 2016 08:59:45 +0000 (08:59 +0000)
pp_ctl.c

index 1a2b0f7..00b9e02 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2487,6 +2487,7 @@ PP(pp_return)
                             cx->blk_gimme, SVs_TEMP|SVs_PADTMP, TRUE);
         SPAGAIN;
        dounwind(cxix);
+        cx = &cxstack[cxix]; /* CX stack may have been realloced */
     }
     else {
         /* Like in the branch above, we need to handle any extra junk on