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

[PATCH] Make malloc.c errors more useful

Thread Next
From:
Richard Soderberg
Date:
October 29, 2001 22:28
Subject:
[PATCH] Make malloc.c errors more useful
Message ID:
200110300628.WAA11025@oregonnet.com
This patch makes it remarkably easier to set the correct breakpoint when
tracking down malloc() bugs.

R.

--- ../perl-clean/malloc.c	Wed Jun 13 10:45:40 2001
+++ malloc.c	Tue Oct 30 01:29:59 2001
@@ -1592,12 +1592,12 @@
 		{
 		    dTHX;
 		    if (!PERL_IS_ALIVE || !PL_curcop || ckWARN_d(WARN_MALLOC))
-			Perl_warner(aTHX_ WARN_MALLOC, "%s free() ignored",
+			Perl_warner(aTHX_ WARN_MALLOC, "%s free() ignored (RMAGIC, PERL_CORE)",
 				    ovp->ov_rmagic == RMAGIC - 1 ?
 				    "Duplicate" : "Bad");
 		}
 #else
-		warn("%s free() ignored",
+		warn("%s free() ignored (RMAGIC)",
 		    ovp->ov_rmagic == RMAGIC - 1 ? "Duplicate" : "Bad");
 #endif		
 #else
@@ -1605,7 +1605,7 @@
 		{
 		    dTHX;
 		    if (!PERL_IS_ALIVE || !PL_curcop || ckWARN_d(WARN_MALLOC))
-			Perl_warner(aTHX_ WARN_MALLOC, "%s", "Bad free() ignored");
+			Perl_warner(aTHX_ WARN_MALLOC, "%s", "Bad free() ignored (PERL_CORE)");
 		}
 #else
 		warn("%s", "Bad free() ignored");

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