summaryrefslogtreecommitdiff
path: root/malloc.c
diff options
context:
space:
mode:
authorDominic Dunlop <domo@computer.org>1998-07-08 11:21:48 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-07-09 01:42:13 +0000
commit802004fa6d912731c22aedfc387948d61f015eb9 (patch)
tree691b02c0cf3d8a77d4b06c3a4f0a83b1f7b5301d /malloc.c
parentd562869cb750e9a45310588fbc5ca6ddbeb69e44 (diff)
downloadperl-802004fa6d912731c22aedfc387948d61f015eb9.tar.gz
reenable misaligned memory checks, cast to UV & check alignment
Message-Id: <v03110703b1c8ffdb68ed@[195.95.102.91]> Subject: Re: [PATCH 5.00469] corrupt malloc ptr on NeXT p4raw-id: //depot/perl@1389
Diffstat (limited to 'malloc.c')
-rw-r--r--malloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/malloc.c b/malloc.c
index 377bc2143b..e52cc0db2a 100644
--- a/malloc.c
+++ b/malloc.c
@@ -735,8 +735,8 @@ malloc(register size_t nbytes)
(long)size));
/* remove from linked list */
-#if defined(RCHECK) && !defined(USE_PERL_SBRK)
- if (*((int*)p) & (sizeof(union overhead) - 1))
+#if defined(RCHECK)
+ if (((UV)p) & (MEM_ALIGNBYTES - 1))
PerlIO_printf(PerlIO_stderr(), "Corrupt malloc ptr 0x%lx at 0x%lx\n",
(unsigned long)*((int*)p),(unsigned long)p);
#endif