From: Gurusamy Sarathy Date: Thu, 5 Nov 1998 04:40:44 +0000 (+0000) Subject: another POPSTACK victim X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3095d9770ef6ed78f84315fc655ef2070c7b9c04;p=p5sagit%2Fp5-mst-13.2.git another POPSTACK victim p4raw-id: //depot/perl@2201 --- diff --git a/cop.h b/cop.h index 1ef5e0c..043ea8d 100644 --- a/cop.h +++ b/cop.h @@ -357,8 +357,8 @@ typedef struct stackinfo PERL_SI; #define PUSHSTACK PUSHSTACKi(PERLSI_UNKNOWN) -/* POPSTACK works with PL_stack_sp, so any local sp modifications may - * need to be flushed with a PUTBACK */ +/* POPSTACK works with PL_stack_sp, so it may need to be bracketed by + * PUTBACK/SPAGAIN to flush/refresh any local SP that may be active */ #define POPSTACK \ STMT_START { \ djSP; \ diff --git a/sv.c b/sv.c index 9dfa4f6..bd421b6 100644 --- a/sv.c +++ b/sv.c @@ -2884,6 +2884,7 @@ sv_clear(register SV *sv) G_DISCARD|G_EVAL|G_KEEPERR); SvREFCNT(sv)--; POPSTACK; + SPAGAIN; LEAVE; } } while (SvOBJECT(sv) && SvSTASH(sv) != stash);