From owner-freebsd-amd64@FreeBSD.ORG Wed Apr 7 06:06:23 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 7BF7516A4DD for ; Wed, 7 Apr 2004 06:06:23 -0700 (PDT) Received: from cri.ensmp.fr (orgenoy.ensmp.fr [193.48.171.195]) by mx1.FreeBSD.org (Postfix) with ESMTP id A39B443D45 for ; Wed, 7 Apr 2004 06:06:22 -0700 (PDT) (envelope-from silber@cri.ensmp.fr) Received: from cri.ensmp.fr (silber@stockholm.cri.ensmp.fr [10.2.14.153]) by cri.ensmp.fr (8.11.2/8.11.2/mx-cri-CRI) with ESMTP id i37D1in23157; Wed, 7 Apr 2004 15:01:44 +0200 (MEST) Message-ID: <4073FBB8.4050600@cri.ensmp.fr> Date: Wed, 07 Apr 2004 15:01:44 +0200 From: Georges-Andre Silber User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031021 X-Accept-Language: en MIME-Version: 1.0 To: Marc Olzheim References: <4073F699.6010402@cri.ensmp.fr> <20040407125532.GA75228@stack.nl> In-Reply-To: <20040407125532.GA75228@stack.nl> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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: Wed, 07 Apr 2004 13:06:23 -0000 Marc Olzheim wrote: > On Wed, Apr 07, 2004 at 02:39:53PM +0200, Georges-Andre Silber wrote: > >>Is it a 'normal' behaviour of malloc()? Shouldn't malloc() return NULL? > > > It should return NULL indeed. I can reproduce this on my -CURRENT > machine, while 5.2.1-RELEASE is ok. > > Marc In my case, the bug was already there with 5.2.1-RELEASE. Strange... I haven't figure out why malloc() calls ldexp(). I took a look at the code in /usr/src/lib/libc/stdlib/malloc.c but I don't think that the right place to look for malloc() code, it does not correspond to the backtrace given by gdb... Georges.