From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7278 invoked by alias); 17 Nov 2005 19:32:13 -0000 Received: (qmail 7263 invoked by uid 22791); 17 Nov 2005 19:32:10 -0000 Received: from zproxy.gmail.com (HELO zproxy.gmail.com) (64.233.162.193) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 17 Nov 2005 19:32:10 +0000 Received: by zproxy.gmail.com with SMTP id l1so3580nzf for ; Thu, 17 Nov 2005 11:32:09 -0800 (PST) Received: by 10.36.71.15 with SMTP id t15mr1371472nza; Thu, 17 Nov 2005 11:32:09 -0800 (PST) Received: by 10.37.2.35 with HTTP; Thu, 17 Nov 2005 11:32:09 -0800 (PST) Message-ID: <8f2776cb0511171132x17fa4192u6ca5af71201e0be3@mail.gmail.com> Date: Thu, 17 Nov 2005 19:46:00 -0000 From: Jim Blandy To: Frederic RISS Subject: Re: [RFC] DW_CFA_restore handling causes memory fault Cc: gdb-patches@sources.redhat.com In-Reply-To: <1132242850.8685.47.camel@crx549.cro.st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <1132242850.8685.47.camel@crx549.cro.st.com> 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/msg00297.txt.bz2 On 11/17/05, Frederic RISS wrote: > The current handling of DW_CFA_restore in dwarf2-frame.c doesn't check > if the value it tries to restore has actually been allocated. This > produces strange results (from undeterministic behavour to a GDB crash). > The attached patch tries to fix that by following the GCC 'convention' > that an unspecified register implies "same value". This replicates what we would have done had that register's slot been allocated, but its value had been left unspecified --- right? > It's debatable wether the compiler is right to produce DW_CFA_restore > without specifying all the registers initial state in the CIE, but > that's another story, isn't it ? Right; we're supposed to be prepared for mis-formed input. It would be nice to have a brief comment explaining that the 'else' half of the 'if' does constitute questionable behavior on the part of the compiler.