From owner-freebsd-bugs Sat Nov 23 08:10:12 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id IAA01090 for bugs-outgoing; Sat, 23 Nov 1996 08:10:12 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id IAA01078; Sat, 23 Nov 1996 08:10:07 -0800 (PST) Date: Sat, 23 Nov 1996 08:10:07 -0800 (PST) Message-Id: <199611231610.IAA01078@freefall.freebsd.org> To: freebsd-bugs Cc: From: Poul-Henning Kamp Subject: Re: bin/2093: /etc/malloc.conf and AMD Reply-To: Poul-Henning Kamp Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR bin/2093; it has been noted by GNATS. From: Poul-Henning Kamp To: gilham@csl.sri.com Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: bin/2093: /etc/malloc.conf and AMD Date: Sat, 23 Nov 1996 17:05:31 +0100 I have mailed the author of amd on this issue: To: jsp@doc.ic.ac.uk Subject: AMD malloc problem. Date: Sat, 23 Nov 1996 17:02:39 +0100 Message-ID: <12545.848764959@critter.tfs.com> From: Poul-Henning Kamp Hi! We have received the attached bug-report in the FreeBSD group. Basically what seems to happen is that if malloc(3) and friends, exhibit some nasty but legal behaviour amd falls over. What happens when you set the malloc.conf to "AJ" is that all allocations gets filled with the byte value 0xd0 before being returned from malloc() or realloc() or when returned to free() or realloc(). This generally exposes errors where the program tacitly expects the memory to be zero-filled, or if memory is used after being freed, both of which is far more common than one would expect. (amongst the previous casualities we can mention fsck, ranlib, systat &c &c) Should you wish to try to reproduce this problem, you can easily use the "phkmalloc" implementation, simply by adding the file ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/\ src/lib/libc/stdlib/malloc.c to the sources of amd. The manpage is ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/\ src/lib/libc/stdlib/malloc.3 I must admit that I don't know if we are up to date with amd or if a newer version exists, in which case I presume we tell the original submitter to upgrade and test it again. Thanks in advance! Poul-Henning Kamp The FreeBSD core-team.