From: Gerard Goossen Date: Mon, 2 Nov 2009 15:27:42 +0000 (+0100) Subject: Add assertions about there being no leftover scopes when enter perl_destruct. X-Git-Tag: accepted/trunk/20130322.191538~9848^2~171 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d22c4f05aed968c6c562e40be30222328d66f6b;p=platform%2Fupstream%2Fperl.git Add assertions about there being no leftover scopes when enter perl_destruct. --- diff --git a/perl.c b/perl.c index e1c9ee1..dbb2081 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();