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.
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);
}
POPSTACK_TO(PL_mainstack);
- dounwind(-1);
+ if (cxstack_ix >= 0) {
+ dounwind(-1);
+ POPBLOCK(cxstack);
+ }
LEAVE_SCOPE(0);
JMPENV_JUMP(2);