Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@red-bean.com>
To: Frederic RISS <frederic.riss@st.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFC] DW_CFA_restore handling causes memory fault
Date: Thu, 17 Nov 2005 19:46:00 -0000	[thread overview]
Message-ID: <8f2776cb0511171132x17fa4192u6ca5af71201e0be3@mail.gmail.com> (raw)
In-Reply-To: <1132242850.8685.47.camel@crx549.cro.st.com>

On 11/17/05, Frederic RISS <frederic.riss@st.com> 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.


  reply	other threads:[~2005-11-17 19:32 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-17 18:58 Frederic RISS
2005-11-17 19:46 ` Jim Blandy [this message]
2005-11-18 12:12   ` Frederic RISS
2005-11-18 12:32     ` Jim Blandy
2005-11-18 13:30       ` Frederic RISS
2005-11-18 14:21         ` Mark Kettenis
2005-11-18 15:55           ` Frederic RISS
2005-11-23 16:51           ` Frederic RISS
2005-11-25 10:32             ` Mark Kettenis
2005-11-25 14:31               ` Frederic RISS
2005-11-25 18:35                 ` Daniel Jacobowitz
2005-11-25 23:00                 ` Mark Kettenis
2005-11-25 23:21                   ` Joel Brobecker
2005-11-28 19:30                     ` Frederic RISS
2005-11-18 14:43         ` Eli Zaretskii
2005-11-18 15:08           ` Frederic RISS

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8f2776cb0511171132x17fa4192u6ca5af71201e0be3@mail.gmail.com \
    --to=jimb@red-bean.com \
    --cc=frederic.riss@st.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox