From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:44731) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRlKt-0006PG-JK for qemu-devel@nongnu.org; Wed, 01 Jun 2011 09:19:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QRlKr-0005Sx-H6 for qemu-devel@nongnu.org; Wed, 01 Jun 2011 09:19:47 -0400 Received: from mail-px0-f174.google.com ([209.85.212.174]:49598) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRlKr-0005Sh-3l for qemu-devel@nongnu.org; Wed, 01 Jun 2011 09:19:45 -0400 Received: by pxi15 with SMTP id 15so3664463pxi.33 for ; Wed, 01 Jun 2011 06:19:43 -0700 (PDT) Sender: Richard Henderson Message-ID: <4DE63C6A.6060603@twiddle.net> Date: Wed, 01 Jun 2011 06:19:38 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1306931798-2475-1-git-send-email-cedric.vincent@st.com> In-Reply-To: <1306931798-2475-1-git-send-email-cedric.vincent@st.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH] linux-user: Fix the load of ELF files that have no "useful" symbol List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?Q8OpZHJpYyBWSU5DRU5U?= Cc: Yves JANIN , Riku Voipio , qemu-devel@nongnu.org On 06/01/2011 05:36 AM, Cédric VINCENT wrote: > This patch fixes a "double free()" due to "realloc(syms, 0)" in the > loader when the ELF file has no "useful" symbol, as with the following > example (compiled with "sh4-linux-gcc -nostdlib"): > > .text > .align 1 > .global _start > _start: > mov #1, r3 > trapa #40 // syscall(__NR_exit) > nop > > The bug appears when the log (option "-d") is enabled. > > Signed-off-by: Cédric VINCENT > Signed-off-by: Yves JANIN Reviewed-by: Richard Henderson r~