malloc: bug or feature ?

Peter Wemm peter at wemm.org
Fri Apr 9 07:47:01 PDT 2004


On Friday 09 April 2004 01:31 am, James R. Van Artsalen wrote:
> Peter Wemm wrote:
> > The SEGV looks suspicious though.  I wonder if malloc is trying to
> > put the junk in without checking if malloc failed.
>
> Attached is a proposed patch for this bug.  It fixes the test program
> (which now fails the ASSERT in main() as it ought to).  I have not
> tested it in any other way.
>
> Without this change I expect every brk(2) call that fails to crash.
>
> I haven't checked for equivalent bugs in other functions.

OK, this is embarresing :-)  Thanks!
-- 
Peter Wemm - peter at wemm.org; peter at FreeBSD.org; peter at yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5


More information about the freebsd-amd64 mailing list