summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2010-04-21 00:00:09 +0100
committerDavid Mitchell <davem@iabyn.com>2010-04-25 13:24:29 +0100
commitfebb3a6d221072614a4dcfef3d3953e212e5cf6c (patch)
tree77ef0076d97be14c024406d9012b49db19234ad2 /perl.c
parentdb93c0c46b34e8b2e37c671b7362d0fa2550f5f7 (diff)
downloadperl-febb3a6d221072614a4dcfef3d3953e212e5cf6c.tar.gz
unwinding target nominated by separate global
When unwinding due to die, the new global PL_restartjmpenv points to the JMP_ENV at which longjmping should stop and control should be transferred to PL_restartop. This replaces the previous use of cxstack[cxstack_ix+1].blk_eval.cur_top_env, located in a nominally-discarded context frame.
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/perl.c b/perl.c
index 5dad874f55..7a87120b5e 100644
--- a/perl.c
+++ b/perl.c
@@ -2193,6 +2193,7 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit)
#endif
ENTER;
+ PL_restartjmpenv = NULL;
PL_restartop = 0;
return NULL;
}
@@ -2298,6 +2299,7 @@ S_run_body(pTHX_ I32 oldscope)
/* do it */
if (PL_restartop) {
+ PL_restartjmpenv = NULL;
PL_op = PL_restartop;
PL_restartop = 0;
CALLRUNOPS(aTHX);
@@ -2620,6 +2622,7 @@ Perl_call_sv(pTHX_ SV *sv, VOL I32 flags)
/* NOTREACHED */
case 3:
if (PL_restartop) {
+ PL_restartjmpenv = NULL;
PL_op = PL_restartop;
PL_restartop = 0;
goto redo_body;
@@ -2720,6 +2723,7 @@ Perl_eval_sv(pTHX_ SV *sv, I32 flags)
/* NOTREACHED */
case 3:
if (PL_restartop) {
+ PL_restartjmpenv = NULL;
PL_op = PL_restartop;
PL_restartop = 0;
goto redo_body;