From: Gurusamy Sarathy Date: Sun, 6 Feb 2000 21:27:03 +0000 (+0000) Subject: fix debug code in Perl_malloc() (from Ilya Zakharevich) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7fa2f4f15785dd46abca32ba3f3cb3aabf0263dd;p=p5sagit%2Fp5-mst-13.2.git fix debug code in Perl_malloc() (from Ilya Zakharevich) p4raw-id: //depot/perl@5010 --- diff --git a/malloc.c b/malloc.c index 5e85661..664fbe7 100644 --- a/malloc.c +++ b/malloc.c @@ -1034,8 +1034,15 @@ Perl_malloc(register size_t nbytes) if ((PTR2UV(p)) & (MEM_ALIGNBYTES - 1)) { dTHXo; PerlIO_printf(PerlIO_stderr(), - "Corrupt malloc ptr 0x%lx at 0x%"UVxf"\n", - (unsigned long)*((int*)p),PTR2UV(p)); + "Unaligned pointer in the free chain 0x%"UVxf"\n", + PTR2UV(p)); + } + if ((PTR2UV(p->ov_next)) & (MEM_ALIGNBYTES - 1)) { + dTHXo; + PerlIO_printf(PerlIO_stderr(), + "Unaligned `next' pointer in the free " + "chain 0x"UVxf" at 0x%"UVxf"\n", + PTR2UV(p->ov_next), PTR2UV(p)); } #endif nextf[bucket] = p->ov_next;