From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fna7B-0000ts-7a for qemu-devel@nongnu.org; Tue, 06 Jun 2006 07:52:53 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fna79-0000rm-RU for qemu-devel@nongnu.org; Tue, 06 Jun 2006 07:52:52 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fna79-0000rc-GA for qemu-devel@nongnu.org; Tue, 06 Jun 2006 07:52:51 -0400 Received: from [68.230.240.35] (helo=eastrmmtao04.cox.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FnaEV-0006Fw-Rk for qemu-devel@nongnu.org; Tue, 06 Jun 2006 08:00:28 -0400 Received: from eastrmwml06.mgt.cox.net ([172.18.52.67]) by eastrmmtao04.cox.net (InterMail vM.6.01.06.01 201-2131-130-101-20060113) with ESMTP id <20060606115247.VMLR9931.eastrmmtao04.cox.net@eastrmwml06.mgt.cox.net> for ; Tue, 6 Jun 2006 07:52:47 -0400 Message-ID: <5470482.1149594767793.JavaMail.root@eastrmwml06.mgt.cox.net> Date: Tue, 6 Jun 2006 7:52:47 -0400 From: Ben Taylor Subject: Re: [Qemu-devel] Typo in get_reloc_expr (dyngen.c) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Reply-To: sol10x86@cox.net, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Fabrice or Paul: Can we get this added? This patch has been posted to the list 4 or 5 times in various incarnations in the last year or soj. I posted a long message with the logs from the compile on why the current code is wrong, and why this patch fixes it. The basic problem is that code uses a sizeof construct, instead of the size of the string. What happens is all the labels end up being truncated, and the op.c won't compile on sparc. see analysis of this problem in http://lists.gnu.org/archive/html/qemu-devel/2006-04/msg00494.html Ben ---- Stuart Brady wrote: > Hi, > > There's a small bug in get_reloc_expr in dyngen.c. > > It should only affect SPARC hosts, but it can't be causing any real > problems, or someone would have noticed it by now. > > I'm trying to port QEMU to PA-RISC[0], and needed this code, so it did > actually affect me. I've attached the (one-line) patch. > -- > Stuart Brady > > [0] http://homepage.ntlworld.com/wholehog/stuart/qemu/guest.html