diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-02-06 21:27:03 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-02-06 21:27:03 +0000 |
commit | 7fa2f4f15785dd46abca32ba3f3cb3aabf0263dd (patch) | |
tree | 10a90b97ad1f47153baa2fba9efed3199246c1c3 /malloc.c | |
parent | 3818b22bb9ef820a2553aa5e3504220f3b156f21 (diff) | |
download | perl-7fa2f4f15785dd46abca32ba3f3cb3aabf0263dd.tar.gz |
fix debug code in Perl_malloc() (from Ilya Zakharevich)
p4raw-id: //depot/perl@5010
Diffstat (limited to 'malloc.c')
-rw-r--r-- | malloc.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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; |