Integrate with Sarathy; manual resolve on regcomp.c conflicts
[p5sagit/p5-mst-13.2.git] / pp_ctl.c
index 3bf4f1d..9126007 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2436,18 +2436,20 @@ S_docatch(pTHX_ OP *o)
     dTHR;
     int ret;
     OP *oldop = PL_op;
+    volatile PERL_SI *cursi = PL_curstackinfo;
+    dJMPENV;
 
 #ifdef DEBUGGING
     assert(CATCH_GET == TRUE);
 #endif
     PL_op = o;
  redo_body:
-    CALLPROTECT(aTHX_ &ret, MEMBER_TO_FPTR(S_docatch_body));
+    CALLPROTECT(aTHX_ pcur_env, &ret, MEMBER_TO_FPTR(S_docatch_body));
     switch (ret) {
     case 0:
        break;
     case 3:
-       if (PL_restartop) {
+       if (PL_restartop && cursi == PL_curstackinfo) {
            PL_op = PL_restartop;
            PL_restartop = 0;
            goto redo_body;
@@ -2817,8 +2819,8 @@ PP(pp_require)
                        loader = *av_fetch((AV *)SvRV(loader), 0, TRUE);
                    }
 
-                   Perl_sv_setpvf(aTHX_ namesv, "/loader/0x%lx/%s",
-                                  SvANY(loader), name);
+                   Perl_sv_setpvf(aTHX_ namesv, "/loader/0x%"UVxf"/%s",
+                                  PTR2UV(SvANY(loader)), name);
                    tryname = SvPVX(namesv);
                    tryrsfp = 0;
 
@@ -3122,6 +3124,7 @@ PP(pp_leaveeval)
            MEXTEND(mark,0);
            *MARK = &PL_sv_undef;
        }
+       SP = MARK;
     }
     else {
        /* in case LEAVE wipes old return values */