summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorGerard Goossen <gerard@ggoossen.net>2009-11-02 16:27:42 +0100
committerRafael Garcia-Suarez <rgs@consttype.org>2009-11-08 14:34:38 +0100
commit3d22c4f05aed968c6c562e40be30222328d66f6b (patch)
tree60bf5154a9f3580bd34e29ffaf2aa93b0baf29e1 /perl.c
parent394f6a098b9fc7255c17e6d9614c6c9fff4793ea (diff)
downloadperl-3d22c4f05aed968c6c562e40be30222328d66f6b.tar.gz
Add assertions about there being no leftover scopes when enter perl_destruct.
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/perl.c b/perl.c
index e1c9ee19ab..dbb2081b8e 100644
--- a/perl.c
+++ b/perl.c
@@ -540,6 +540,8 @@ perl_destruct(pTHXx)
PERL_UNUSED_ARG(my_perl);
#endif
+ assert(PL_scopestack_ix == 1);
+
/* wait for all pseudo-forked children to finish */
PERL_WAIT_FOR_CHILDREN;
@@ -567,6 +569,7 @@ perl_destruct(pTHXx)
}
LEAVE;
FREETMPS;
+ assert(PL_scopestack_ix == 0);
/* Need to flush since END blocks can produce output */
my_fflush_all();