summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-11-05 04:40:44 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-11-05 04:40:44 +0000
commit3095d9770ef6ed78f84315fc655ef2070c7b9c04 (patch)
tree672a4c42f4cdd7431474624aaba45ef7815601dc
parentebafeae7404ab232f258bc8cdedeb751e7c60ecb (diff)
downloadperl-3095d9770ef6ed78f84315fc655ef2070c7b9c04.tar.gz
another POPSTACK victim
p4raw-id: //depot/perl@2201
-rw-r--r--cop.h4
-rw-r--r--sv.c1
2 files changed, 3 insertions, 2 deletions
diff --git a/cop.h b/cop.h
index 1ef5e0c492..043ea8d6d0 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 9dfa4f62a1..bd421b6a15 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);