assert() that we're not trying to free scalars a second time.
Nicholas Clark [Mon, 31 Dec 2007 11:04:54 +0000 (11:04 +0000)]
p4raw-id: //depot/perl@32788

sv.c

diff --git a/sv.c b/sv.c
index bf8d503..7844c49 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -5136,6 +5136,7 @@ Perl_sv_clear(pTHX_ register SV *sv)
 
     assert(sv);
     assert(SvREFCNT(sv) == 0);
+    assert(SvTYPE(sv) != SVTYPEMASK);
 
     if (type <= SVt_IV) {
        /* See the comment in sv.h about the collusion between this early