From owner-freebsd-current Fri Nov 22 18:37:24 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BDA8E37B401 for ; Fri, 22 Nov 2002 18:37:23 -0800 (PST) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0F12843E88 for ; Fri, 22 Nov 2002 18:37:23 -0800 (PST) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.3/8.12.3) with ESMTP id gAN2bKpk091960; Fri, 22 Nov 2002 19:37:22 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Fri, 22 Nov 2002 19:36:35 -0700 (MST) Message-Id: <20021122.193635.99607054.imp@bsdimp.com> To: marc@informatik.uni-bremen.de Cc: freebsd-current@FreeBSD.ORG Subject: Re: malloc(0) broken? From: "M. Warner Losh" In-Reply-To: <79620000.1037978720@leeloo.intern.geht.de> References: <79620000.1037978720@leeloo.intern.geht.de> X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message: <79620000.1037978720@leeloo.intern.geht.de> Marc Recht writes: : A malloc(0) returns always 0x800 on my system. This causes some third-party : software to fail, because they expect malloc(0) to return NULL. Is this a : bug or a feature? malloc(3) doesn't mention anything. malloc(0) is undefined. If people expect it to return NULL, that software is not standard conforming. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message