Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Sep 1997 19:06:20 -0700
From:      John-Mark Gurney <gurney_j@efn.org>
To:        Andrew Atrens <atrens@nortel.ca>
Cc:        hackers@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG
Subject:   Re: Bug in malloc/free (was: Memory leak in getservbyXXX?)
Message-ID:  <19970918190620.27911@hydrogen.nike.efn.org>
In-Reply-To: <199709182202.PAA10664@hub.freebsd.org>; from Andrew Atrens on Thu, Sep 18, 1997 at 05:59:00PM -0500
References:  <199709182202.PAA10664@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970918190620.27911>