From owner-freebsd-hackers Thu Sep 18 19:06:32 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id TAA28935 for hackers-outgoing; Thu, 18 Sep 1997 19:06:32 -0700 (PDT) Received: from hydrogen.nike.efn.org (resnet.uoregon.edu [128.223.170.28]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id TAA28927; Thu, 18 Sep 1997 19:06:27 -0700 (PDT) Received: (from jmg@localhost) by hydrogen.nike.efn.org (8.8.7/8.8.7) id TAA01084; Thu, 18 Sep 1997 19:06:21 -0700 (PDT) Message-ID: <19970918190620.27911@hydrogen.nike.efn.org> Date: Thu, 18 Sep 1997 19:06:20 -0700 From: John-Mark Gurney To: Andrew Atrens Cc: hackers@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG Subject: Re: Bug in malloc/free (was: Memory leak in getservbyXXX?) References: <199709182202.PAA10664@hub.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.69 In-Reply-To: <199709182202.PAA10664@hub.freebsd.org>; from Andrew Atrens on Thu, Sep 18, 1997 at 05:59:00PM -0500 Reply-To: John-Mark Gurney Organization: Cu Networking X-Operating-System: FreeBSD 2.2.1-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Andrew Atrens scribbled this message on Sep 18: > In message "Bug in malloc/free (was: Memory leak in getservbyXXX?)", phk@critter.freebsd.dk writes: > > > > > This is about the only way you could get it to loop I think. That means > > that somebody wrote to memory malloc hadn't passed them (ie: your code). > > > > This would indicate a bug of the class where memory is written to after > > being free()'ed, a kind of bug which phkmalloc makes no attempt to catch. > > Why not have free() shred memory its releasing? Shredding memory with high > values can often cause the offending code (which is still attempting > to r/w this memory) to bus error. umm... malloc's option J does this: J ``junk'' fill some junk into the area allocated. Currently junk is bytes of 0xd0, this is pronounced ``Duh'' :-) -- John-Mark Gurney Modem/FAX: +1 541 683 6954 Cu Networking Live in Peace, destroy Micro$oft, support free software, run FreeBSD