develooper Front page | perl.perl5.porters | Postings from October 2003

[patch sv.c] improve "...free unref scalar" warning

Thread Next
From:
Stas Bekman
Date:
October 6, 2003 21:20
Subject:
[patch sv.c] improve "...free unref scalar" warning
Message ID:
3F823EE9.4030103@stason.org
When an unreferenced SV is freed, print its SV address to help finding the 
failure.

--- sv.c.orig   2003-10-06 20:12:38.000000000 -0700
+++ sv.c        2003-10-06 20:13:45.000000000 -0700
@@ -5316,7 +5316,9 @@
             return;
         }
         if (ckWARN_d(WARN_INTERNAL))
-           Perl_warner(aTHX_ packWARN(WARN_INTERNAL), "Attempt to free 
unreferenced scalar");
+           Perl_warner(aTHX_ packWARN(WARN_INTERNAL),
+                        "Attempt to free unreferenced scalar SV 0x%"UVxf,
+                PTR2UV(sv));
         return;
      }
      ATOMIC_DEC_AND_TEST(refcount_is_zero, SvREFCNT(sv));


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About