On Wed Feb 06 13:04:45 2013, RURBAN wrote:
Show quoted text
It was this commit:
commit fe54beba3a096a44113f13da9f1b10564e27a60a
Author: David Mitchell <davem@iabyn.com>
Date: Tue Dec 18 23:41:29 2012 +0000
test the resetting of refcnt for immortals
PL_sv_undef etc get given a very high ref count, which if it ever reaches
zero, is set back to a high value. On debugging builds, use a lower value
(1000) so that the resetting code gets exercised occasionally.
Also, replace literal (~(U32)0)/2 with the constant SvREFCNT_IMMORTAL.
The value of the refcount is now a lot lower (roughly 1000) where
-DDEUBUGGING is defined:
diff --git a/sv.h b/sv.h
index e248ba7..09489b7 100644
--- a/sv.h
+++ b/sv.h
@@ -2061,6 +2061,13 @@ alternative is to call C<sv_grow> if you are not sure of the type of SV.
#define SvIMMORTAL(sv) ((sv)==&PL_sv_undef || (sv)==&PL_sv_yes || (sv)==&PL_sv_no || (sv)==&PL_sv_placeholder)
+#ifdef DEBUGGING
+ /* exercise the immortal resurrection code in sv_free2() */
+# define SvREFCNT_IMMORTAL 1000
+#else
+# define SvREFCNT_IMMORTAL ((~(U32)0)/2)
+#endif
+
/*
=for apidoc Am|SV *|boolSV|bool b
I guess that the most robust patch would be only to lower the
sought after value if the version is v5.17.7 or later.
Nicholas Clark