From owner-freebsd-amd64@FreeBSD.ORG Fri Apr 9 07:47:01 2004 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3496A16A4CE for ; Fri, 9 Apr 2004 07:47:01 -0700 (PDT) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0358643D54 for ; Fri, 9 Apr 2004 07:47:01 -0700 (PDT) (envelope-from peter@evilpete.dyndns.org) Received: from fw.wemm.org (canning.wemm.org [192.203.228.65]) by canning.wemm.org (Postfix) with ESMTP id A07A12A904 for ; Fri, 9 Apr 2004 07:47:00 -0700 (PDT) (envelope-from peter@overcee.wemm.org) Received: from overcee.wemm.org (overcee.wemm.org [10.0.0.3]) by fw.wemm.org (Postfix) with ESMTP id 8A9F4E29E for ; Fri, 9 Apr 2004 07:47:02 -0700 (PDT) (envelope-from peter@overcee.wemm.org) Received: from overcee.wemm.org (localhost [127.0.0.1]) by overcee.wemm.org (8.12.11/8.12.11) with ESMTP id i39EkA6x063112; Fri, 9 Apr 2004 07:46:10 -0700 (PDT) (envelope-from peter@overcee.wemm.org) Received: from localhost (localhost [[UNIX: localhost]]) by overcee.wemm.org (8.12.11/8.12.11/Submit) id i39Ek9hb063110; Fri, 9 Apr 2004 07:46:09 -0700 (PDT) (envelope-from peter) From: Peter Wemm To: "James R. Van Artsalen" Date: Fri, 9 Apr 2004 07:46:09 -0700 User-Agent: KMail/1.6.1 References: <4073F699.6010402@cri.ensmp.fr> <407539A6.4090701@jrv.org> <40765F44.9070705@jrv.org> In-Reply-To: <40765F44.9070705@jrv.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200404090746.09741.peter@wemm.org> cc: freebsd-amd64@freebsd.org Subject: Re: malloc: bug or feature ? X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2004 14:47:01 -0000 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@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5