From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NHag4-00045K-78 for qemu-devel@nongnu.org; Mon, 07 Dec 2009 05:18:48 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NHafz-00044M-CR for qemu-devel@nongnu.org; Mon, 07 Dec 2009 05:18:47 -0500 Received: from [199.232.76.173] (port=54920 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHafy-00044F-Gk for qemu-devel@nongnu.org; Mon, 07 Dec 2009 05:18:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:61714) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NHafx-0004kZ-NI for qemu-devel@nongnu.org; Mon, 07 Dec 2009 05:18:42 -0500 Message-ID: <4B1CD624.5090404@redhat.com> Date: Mon, 07 Dec 2009 11:17:08 +0100 From: Kevin Wolf MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Permit zero-sized qemu_malloc() & friends References: <4B193DA5.6040507@codemonkey.ws> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: malc Cc: Paul Brook , Markus Armbruster , qemu-devel@nongnu.org Am 07.12.2009 11:00, schrieb malc: >>>> Misunderstanding? Such behavior is indeed permissible, and I can't see >>>> where I restricted it away. An implementation that behaves as you >>>> describe returns "pointer to allocated space". That the pointer has >>>> some funny bit set doesn't matter. That it can't be dereferenced is >>>> just fine. >>>> > > Here you agree that it's permissible. He's just differentiating between values that are generally permissible in terms of the C standard... >> You can't just pull pointers out of your ear and expect stuff to work. > > And here you don't. Which renders whole discussion rather pointless. ...and values that can be used by a working implementation on Linux. That's quite a difference. It is obvious that a libc implementation must match the kernel, or nothing will work. Kevin