Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MjeGE-0003XT-Sz for qemu-devel@nongnu.org; Fri, 04 Sep 2009 15:15:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MjeG9-0003XG-CV for qemu-devel@nongnu.org; Fri, 04 Sep 2009 15:15:49 -0400 Received: from [199.232.76.173] (port=57518 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MjeG9-0003XD-85 for qemu-devel@nongnu.org; Fri, 04 Sep 2009 15:15:45 -0400 Received: from smtp6-g21.free.fr ([212.27.42.6]:39935) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MjeG8-00045U-Fa for qemu-devel@nongnu.org; Fri, 04 Sep 2009 15:15:45 -0400 From: "Jean-Christophe Dubois" Subject: Re: [Qemu-devel] [PATCH] Fix error checking and cleaning in path.c V2 Date: Fri, 4 Sep 2009 21:15:30 +0200 References: <1252014464-25063-1-git-send-email-jcd@tribudubois.net> <4AA15457.20700@codemonkey.ws> In-Reply-To: <4AA15457.20700@codemonkey.ws> MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909042115.31434.jcd@tribudubois.net> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org On Friday 04 September 2009 19:54:31 Anthony Liguori wrote: > Jean-Christophe DUBOIS wrote: > > Very little error checking was done in path.c and we were > > leaking some memories in case of error. > > > > This patch rely on the abort() behavior of qemu_malloc and > > friends > > > > Signed-off-by: Jean-Christophe Dubois > > This breaks the linux-user build. Strange !!! On my system, it doesn't break the build (everything is compiling fine) but the linux-user binaries are indeed wrong as they are missing the qemu_strdup() function ... and they fail to run ... How could the link succeed ???? I'll look into it. However, note that this is related to a question I asked on this list back in june. Why are xxx-user (in xxx-user/mmap.c files) implemetation of qemu_malloc and friends not on par with the main qemu implementation? They are not the same on a content point of view (qemu_stdup and qemu_strndup are missing) and on a behavior point of view (they don't abort on failure). A lot of code in qemu is now assuming qemu_malloc will abort on error but this is not the case for the xxx-user build. Is this perceived as a problem? JC > > Regards, > > Anthony Liguori