This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
_90 op/tie.t gets "Segmentation fault" with Sarathy's perl_call patch
[perl5.git] / pp_ctl.c
index 6eab4da..c2f1361 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1946,10 +1946,10 @@ OP *o;
 {
     int ret;
     int oldrunlevel = runlevel;
+    OP *oldop = op;
     Sigjmp_buf oldtop;
 
     op = o;
-    runlevel--;                                /* pretense */
     Copy(top_env, oldtop, 1, Sigjmp_buf);
 #ifdef DEBUGGING
     assert(mustcatch == TRUE);
@@ -1960,6 +1960,7 @@ OP *o;
        Copy(oldtop, top_env, 1, Sigjmp_buf);
        runlevel = oldrunlevel;
        mustcatch = TRUE;
+       op = oldop;
        Siglongjmp(top_env, ret);
        /* NOTREACHED */
     case 3:
@@ -1977,6 +1978,7 @@ OP *o;
     Copy(oldtop, top_env, 1, Sigjmp_buf);
     runlevel = oldrunlevel;
     mustcatch = TRUE;
+    op = oldop;
     return Nullop;
 }