Change 32918 by [EMAIL PROTECTED] on 2008/01/09 15:34:42

        Add DEBUG_LEAKING_SCALARS_ABORT, to call abort() if any scalars leak,
        or are freed too many times.

Affected files ...

... //depot/perl/perl.c#842 edit
... //depot/perl/sv.c#1480 edit

Differences ...

==== //depot/perl/perl.c#842 (text) ====
Index: perl/perl.c
--- perl/perl.c#841~32902~      2008-01-08 09:55:41.000000000 -0800
+++ perl/perl.c 2008-01-09 07:34:42.000000000 -0800
@@ -1256,6 +1256,10 @@
     }
 #endif
 #endif
+#ifdef DEBUG_LEAKING_SCALARS_ABORT
+    if (PL_sv_count)
+       abort();
+#endif
     PL_sv_count = 0;
 
 #ifdef PERL_DEBUG_READONLY_OPS

==== //depot/perl/sv.c#1480 (text) ====
Index: perl/sv.c
--- perl/sv.c#1479~32901~       2008-01-08 09:35:19.000000000 -0800
+++ perl/sv.c   2008-01-09 07:34:42.000000000 -0800
@@ -5431,6 +5431,9 @@
   #endif
 #endif
        }
+#ifdef DEBUG_LEAKING_SCALARS_ABORT
+       abort();
+#endif
        return;
     }
     if (--(SvREFCNT(sv)) > 0)
End of Patch.

Reply via email to