In SvPV_free(), assert() that no-one is trying to free up a reference.
Nicholas Clark [Sun, 23 Dec 2007 12:31:26 +0000 (12:31 +0000)]
p4raw-id: //depot/perl@32717

sv.h

diff --git a/sv.h b/sv.h
index 7098088..63eccbd 100644 (file)
--- a/sv.h
+++ b/sv.h
@@ -1428,6 +1428,7 @@ the scalar's value cannot change unless written to.
     STMT_START {                                                       \
                     assert(SvTYPE(sv) >= SVt_PV);                      \
                     if (SvLEN(sv)) {                                   \
+                        assert(!SvROK(sv));                            \
                         if(SvOOK(sv)) {                                \
                             SvPV_set(sv, SvPVX_mutable(sv) - SvIVX(sv)); \
                             SvFLAGS(sv) &= ~SVf_OOK;                   \