p4raw-id: //depot/win32/perl@878
#define POPSTACK_TO(s) \
STMT_START { \
- while (curstack != s) \
+ while (curstack != s) { \
+ dounwind(-1); \
POPSTACK(); \
+ } \
} STMT_END
op_free(main_root);
main_root = Nullop;
}
+ curcop = &compiling;
main_start = Nullop;
SvREFCNT_dec(main_cv);
main_cv = Nullcv;
curstackinfo = curstackinfo->si_next;
while (curstackinfo) {
PERL_SI *p = curstackinfo->si_prev;
- SvREFCNT_dec(curstackinfo->si_stack);
+ /* curstackinfo->si_stack got nuked by sv_free_arenas() */
Safefree(curstackinfo->si_cxstack);
Safefree(curstackinfo);
curstackinfo = p;
static void
my_exit_jump(void)
{
- dTHR;
+ dSP;
register PERL_CONTEXT *cx;
I32 gimme;
SV **newsp;
e_tmpname = Nullch;
}
+ POPSTACK_TO(mainstack);
if (cxstack_ix >= 0) {
if (cxstack_ix > 0)
dounwind(0);
else
sv_setpv(ERRSV, message);
- while ((cxix = dopoptoeval(cxstack_ix)) < 0 && curstackinfo->si_prev)
+ while ((cxix = dopoptoeval(cxstack_ix)) < 0 && curstackinfo->si_prev) {
+ dounwind(-1);
POPSTACK();
+ }
if (cxix >= 0) {
I32 optype;