From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19952 invoked by alias); 25 Nov 2005 10:32:47 -0000 Received: (qmail 19938 invoked by uid 22791); 25 Nov 2005 10:32:46 -0000 X-Spam-Check-By: sourceware.org Received: from lon-del-02.spheriq.net (HELO lon-del-02.spheriq.net) (195.46.50.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 25 Nov 2005 10:32:43 +0000 Received: from lon-out-03.spheriq.net ([195.46.50.131]) by lon-del-02.spheriq.net with ESMTP id jAPAWcU0027711 for ; Fri, 25 Nov 2005 10:32:39 GMT Received: from lon-cus-01.spheriq.net (lon-cus-01.spheriq.net [195.46.50.37]) by lon-out-03.spheriq.net with ESMTP id jAPAWZpe028906 for ; Fri, 25 Nov 2005 10:32:36 GMT Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by lon-cus-01.spheriq.net with ESMTP id jAPAWVui003392 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Fri, 25 Nov 2005 10:32:35 GMT Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 55657DC72; Fri, 25 Nov 2005 10:19:40 +0000 (GMT) Received: by zeta.dmz-eu.st.com (STMicroelectronics, from userid 60012) id C51D847397; Fri, 25 Nov 2005 10:22:42 +0000 (GMT) Received: from zeta.dmz-eu.st.com (localhost [127.0.0.1]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 60FF975995; Fri, 25 Nov 2005 10:22:42 +0000 (UTC) Received: from mail1.cro.st.com (mail1.cro.st.com [164.129.40.131]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 6C2594739F; Fri, 25 Nov 2005 10:22:41 +0000 (GMT) Received: from crx549.cro.st.com (crx549.cro.st.com [164.129.44.49]) by mail1.cro.st.com (MOS 3.5.8-GR) with ESMTP id CGB72458 (AUTH "frederic riss"); Fri, 25 Nov 2005 11:19:33 +0100 (CET) Subject: Re: [RFC] DW_CFA_restore handling causes memory fault From: Frederic RISS To: Mark Kettenis Cc: jimb@red-bean.com, gdb-patches@sources.redhat.com In-Reply-To: <200511242248.jAOMmCfC031451@elgar.sibelius.xs4all.nl> References: <1132242850.8685.47.camel@crx549.cro.st.com> <8f2776cb0511171132x17fa4192u6ca5af71201e0be3@mail.gmail.com> <1132301881.8685.63.camel@crx549.cro.st.com> <8f2776cb0511180035ndadf290ta81520f75cf601d5@mail.gmail.com> <1132317183.8685.101.camel@crx549.cro.st.com> <200511181345.jAIDjZNc026609@elgar.sibelius.xs4all.nl> <1132738531.7340.42.camel@crx549.cro.st.com> <200511242248.jAOMmCfC031451@elgar.sibelius.xs4all.nl> Content-Type: multipart/mixed; boundary="=-tGlcepTEkGtL7x7A8072" Date: Fri, 25 Nov 2005 14:31:00 -0000 Message-Id: <1132913972.13035.12.camel@crx549.cro.st.com> Mime-Version: 1.0 X-O-Spoofed: Not Scanned X-O-General-Status: No X-O-Spam1-Status: Not Scanned X-O-Spam2-Status: Not Scanned X-O-URL-Status: Not Scanned X-O-Virus1-Status: No X-O-Virus2-Status: Not Scanned X-O-Virus3-Status: No X-O-Virus4-Status: No X-O-Virus5-Status: Not Scanned X-O-Image-Status: Not Scanned X-O-Attach-Status: Not Scanned X-SpheriQ-Ver: 4.2.0 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2005-11/txt/msg00453.txt.bz2 --=-tGlcepTEkGtL7x7A8072 Content-Type: text/plain Content-Transfer-Encoding: 7bit Content-length: 784 On Thu, 2005-11-24 at 23:48 +0100, Mark Kettenis wrote: > Sorry to be such a prick, but could you change the message [...] > I think that's less confusing. With that change you've got my ok. Well I'm sorry that you have to rewrite my patch yourself :-) I commited the attached patch containing your message to HEAD. Should that go to the 6.4 branch also ? BTW, what's the policy for patches being approved during the release process, do they have implicit approval for HEAD and the branch or does the latter require explicit approval ? > You're not listed in MAINTAINERS though. Do you've got a copyright > assignment in place? I've added myself to the 'Write after approval' section as Jim requested. My work is covered by the STMicroelectronics copyright assignment. Fred. --=-tGlcepTEkGtL7x7A8072 Content-Disposition: attachment; filename=dwarf2_cfa_restore.patch Content-Type: text/x-patch; name=dwarf2_cfa_restore.patch; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-length: 1140 2005-11-25 Frederic Riss * dwarf2-frame.c: (execute_cfa_program): Don't access past the allocated dwarf2_frame_state.initial.regs. Index: dwarf2-frame.c =================================================================== RCS file: /cvs/src/src/gdb/dwarf2-frame.c,v retrieving revision 1.54 diff -u -p -r1.54 dwarf2-frame.c --- dwarf2-frame.c 1 Aug 2005 04:06:27 -0000 1.54 +++ dwarf2-frame.c 25 Nov 2005 06:40:31 -0000 @@ -294,7 +294,17 @@ execute_cfa_program (gdb_byte *insn_ptr, gdb_assert (fs->initial.reg); reg = insn & 0x3f; dwarf2_frame_state_alloc_regs (&fs->regs, reg + 1); - fs->regs.reg[reg] = fs->initial.reg[reg]; + if (reg < fs->initial.num_regs) + fs->regs.reg[reg] = fs->initial.reg[reg]; + else + fs->regs.reg[reg].how = DWARF2_FRAME_REG_UNSPECIFIED; + + if (fs->regs.reg[reg].how == DWARF2_FRAME_REG_UNSPECIFIED) + complaint (&symfile_complaints, _("\ +incomplete CFI data; DW_CFA_restore unspecified\n\ +register %s (#%d) at 0x%s"), + REGISTER_NAME(DWARF2_REG_TO_REGNUM(reg)), + DWARF2_REG_TO_REGNUM(reg), paddr (fs->pc)); } else { --=-tGlcepTEkGtL7x7A8072--