summaryrefslogtreecommitdiff
path: root/ext/XS-APItest/APItest.xs
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2015-10-28 08:28:56 +0000
committerDavid Mitchell <davem@iabyn.com>2016-02-03 09:18:32 +0000
commit3706fcea6257cb3ac83ac11700364056e0799895 (patch)
tree2aca51972376394b429f389b14c10f02e029a274 /ext/XS-APItest/APItest.xs
parent86cc158350c1bc1d2159ec3dbf01e2800bca07dc (diff)
downloadperl-3706fcea6257cb3ac83ac11700364056e0799895.tar.gz
restore PL_tmps_floor on exit
A couple of places were expecting dounwind(-1); LEAVE_SCOPE(0); to restore PL_tmps_floor, since its old value was saved on the savestack. Since that's now stored in the context struct instead, do a POPBLOCK(&cxstack[0]). This problem only showed up on 'make test' rather than 'make test_harness', since only the former sets PERL_DESTRUCT_LEVEL.
Diffstat (limited to 'ext/XS-APItest/APItest.xs')
-rw-r--r--ext/XS-APItest/APItest.xs5
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/XS-APItest/APItest.xs b/ext/XS-APItest/APItest.xs
index 51924a8d47..16a7753036 100644
--- a/ext/XS-APItest/APItest.xs
+++ b/ext/XS-APItest/APItest.xs
@@ -3725,11 +3725,10 @@ CODE:
PERL_SET_CONTEXT(interp);
POPSTACK_TO(PL_mainstack);
+ assert(cxstack_ix >= 0);
dounwind(-1);
+ POPBLOCK(cxstack);
LEAVE_SCOPE(0);
-
- while (interp->Iscopestack_ix > 1)
- LEAVE;
FREETMPS;
perl_destruct(interp);