From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22642 invoked by alias); 18 Nov 2005 12:33:23 -0000 Received: (qmail 22593 invoked by uid 22791); 18 Nov 2005 12:33:19 -0000 Received: from fra-del-04.spheriq.net (HELO fra-del-04.spheriq.net) (195.46.51.100) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 18 Nov 2005 12:33:19 +0000 Received: from fra-out-02.spheriq.net (fra-out-02.spheriq.net [195.46.51.130]) by fra-del-04.spheriq.net with ESMTP id jAICXGlT032010 for ; Fri, 18 Nov 2005 12:33:16 GMT Received: from fra-cus-01.spheriq.net (fra-cus-01.spheriq.net [195.46.51.37]) by fra-out-02.spheriq.net with ESMTP id jAICXCQL000602 for ; Fri, 18 Nov 2005 12:33:13 GMT Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by fra-cus-01.spheriq.net with ESMTP id jAICXBWs026047 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Fri, 18 Nov 2005 12:33:12 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 DEDBEDA43; Fri, 18 Nov 2005 12:33:10 +0000 (GMT) Received: by zeta.dmz-eu.st.com (STMicroelectronics, from userid 60012) id 07D604735A; Fri, 18 Nov 2005 12:36:09 +0000 (GMT) Received: from zeta.dmz-eu.st.com (localhost [127.0.0.1]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id C167F75994; Fri, 18 Nov 2005 12:36:09 +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 1B91C472CA; Fri, 18 Nov 2005 12:36:06 +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 CGA38394 (AUTH "frederic riss"); Fri, 18 Nov 2005 13:33:03 +0100 (CET) Subject: Re: [RFC] DW_CFA_restore handling causes memory fault From: Frederic RISS To: Jim Blandy Cc: gdb-patches@sources.redhat.com In-Reply-To: <8f2776cb0511180035ndadf290ta81520f75cf601d5@mail.gmail.com> 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> Content-Type: multipart/mixed; boundary="=-Wvq3IG63FhAXet6DzM48" Date: Fri, 18 Nov 2005 13:30:00 -0000 Message-Id: <1132317183.8685.101.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.1.07 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/msg00319.txt.bz2 --=-Wvq3IG63FhAXet6DzM48 Content-Type: text/plain Content-Transfer-Encoding: 7bit Content-length: 1153 On Fri, 2005-11-18 at 00:35 -0800, Jim Blandy wrote: > Yes! But --- I apologize for not noticing this from the beginning --- > as I see your comment, it occurs to me that probably a call to > 'complaint' would be better than just a comment. Mark or Daniel can > string me up if they feel this will yield another 'incomplete CFI > data; unspecified blah blah blah' annoyance, but I think it's probably > the right thing. OK, third try attached. I mimiced the formatting of other complaints of the file. I didn't put the complaint in the 'else' clause, but added a check after the whole 'if', because an allocated register state isn't necessarily set to a correct value. Just a question: why are the i18n'ified strings formatted this way ? > If you're doing this as part of your paying > job, then the assignment from STMicroelectronics already on file That's the case. > For the sourceware account, see > http://sourceware.org/cgi-bin/pdw/ps_form.cgi. List me as the person > approving the request. I'll do the request this evening (setting up the CVS access from work will take some time, I'll use my home box for this patch.) Thanks, Fred. --=-Wvq3IG63FhAXet6DzM48 Content-Disposition: attachment; filename=dwarf2.patch Content-Type: text/x-patch; name=dwarf2.patch; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-length: 913 2005-11-17 Frédéric Riss * dwarf2-frame.c: (execute_cfa_program): Don't access past the allocated dwarf2_frame_state.initial.regs. Index: dwarf2-frame.c =================================================================== --- dwarf2-frame.c (revision 98) +++ dwarf2-frame.c (working copy) @@ -294,8 +294,16 @@ 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 of unspecified register state at 0x%s."), + paddr (fs->pc)); } else { --=-Wvq3IG63FhAXet6DzM48--