This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
reverse the order of POPBLOCK; POPFOO
[perl5.git] / pp_hot.c
index b5971f3..d686221 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -3337,11 +3337,10 @@ PP(pp_leavesub)
     }
     PUTBACK;
 
-    POPBLOCK(cx,newpm);
-    cxstack_ix++; /* temporarily protect top context */
     POPSUB(cx);        /* Stack values are safe: release CV and @_ ... */
-    cxstack_ix--;
+    POPBLOCK(cx,newpm);
     PL_curpm = newpm;  /* ... and pop $1 et al */
+    cxstack_ix--;
 
     return cx->blk_sub.retop;
 }