From: Gurusamy Sarathy Date: Sat, 4 Apr 1998 20:31:56 +0000 (+0000) Subject: [win32] fixes for various noises under PERL_DESTRUCT_LEVEL X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bac4b2ad63e048350f82163026a348685ed8c235;p=p5sagit%2Fp5-mst-13.2.git [win32] fixes for various noises under PERL_DESTRUCT_LEVEL p4raw-id: //depot/win32/perl@878 --- diff --git a/cop.h b/cop.h index fa1d54d..4b2e04f 100644 --- a/cop.h +++ b/cop.h @@ -357,6 +357,8 @@ typedef struct stackinfo PERL_SI; #define POPSTACK_TO(s) \ STMT_START { \ - while (curstack != s) \ + while (curstack != s) { \ + dounwind(-1); \ POPSTACK(); \ + } \ } STMT_END diff --git a/perl.c b/perl.c index fdbdad1..a4e8233 100644 --- a/perl.c +++ b/perl.c @@ -327,6 +327,7 @@ perl_destruct(register PerlInterpreter *sv_interp) op_free(main_root); main_root = Nullop; } + curcop = &compiling; main_start = Nullop; SvREFCNT_dec(main_cv); main_cv = Nullcv; @@ -2491,7 +2492,7 @@ nuke_stacks(void) 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; @@ -2978,7 +2979,7 @@ my_failure_exit(void) static void my_exit_jump(void) { - dTHR; + dSP; register PERL_CONTEXT *cx; I32 gimme; SV **newsp; @@ -2993,6 +2994,7 @@ my_exit_jump(void) e_tmpname = Nullch; } + POPSTACK_TO(mainstack); if (cxstack_ix >= 0) { if (cxstack_ix > 0) dounwind(0); diff --git a/pp_ctl.c b/pp_ctl.c index 56f673d..c203126 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -1059,8 +1059,10 @@ die_where(char *message) 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;