Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@specifix.com>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: drow@false.org, gdb-patches@sourceware.org
Subject: Re: RFA: Fix check for no-saved-pc
Date: Mon, 17 Dec 2007 18:43:00 -0000	[thread overview]
Message-ID: <1197916490.20496.42.camel@localhost.localdomain> (raw)
In-Reply-To: <200712162006.lBGK6AXD018398@brahms.sibelius.xs4all.nl>

On Sun, 2007-12-16 at 21:06 +0100, Mark Kettenis wrote:
> > From: Michael Snyder <msnyder@specifix.com>
> > Date: Wed, 12 Dec 2007 11:05:23 -0800
> > 
> > Ping?
> 
> Bleah, I tried to find a window of a bit more than 15 minutes to think
> about a reply for a week and a half and failed :(.
> 
> > > > It's not meaningless; it's a very valuable hint that the stack has been
> > > > corrupted. 
> > > 
> > > My poor choice of words.  What I meant was more like, one is a
> > > "hint" and the other is an explicit statement.  A person does
> > > not need to know what this hint means if gdb tells them
> > > explicitly.
> 
> It doesn't really add much more information:
> 
>   ? 0x00000000 foo
> 
> isn't really less explicit than
> 
>   Saved pc is zero

Well sure it is -- if you're a naive user. 


> Yes, if you fall off the stack, I can imagine you hit zeroes much more
> often.  I've repeatedly stated that people should fix their threading
> libraries to explicitly mark the end of the stack such that this
> doesn't happen, or that we should change GDB such that we terminate
> the stack at the thread entry point, much like we do for main().  I
> really don't want to cripple GDB because people think that's too
> difficult.

We don't have control over those thread libraries, so 
all we can do is (1) ask them, and (2) try to put work
arounds to prevent bogus behavior in gdb.  I don't think
it's wrong to do that.  

Cripple gdb?  It's only crippling gdb if you think that
a saved PC of zero is a legitimate possibility.  I think
that possibility is remote beyond being worthy of consideration.


> Yes, I think your diff cripple GDB.  The zero-pc frame might have
> useful information that could help me track down the memory
> corruption.

Well, then it's really a conflict of interests between the
naive user, and the user who is sophisticated enough to 
(a) know what a stack frame of 0x00000000 implies, and
(b) know how to extract info from a blown stack frame.

I think the naive users outnumber the ones with that
level of sophistication by at least 100's to one, if
not 1000's to one.  We really need to weigh their 
interests a little more heavily.





      reply	other threads:[~2007-12-17 18:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-30 22:53 Michael Snyder
2007-11-30 23:00 ` Daniel Jacobowitz
2007-12-01  1:50   ` Michael Snyder
2007-12-04  2:06     ` Michael Snyder
2007-12-04 18:05     ` Mark Kettenis
2007-12-04 23:25       ` Michael Snyder
2007-12-12 19:42         ` Michael Snyder
2007-12-16 20:08           ` Mark Kettenis
2007-12-17 18:43             ` Michael Snyder [this message]

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=1197916490.20496.42.camel@localhost.localdomain \
    --to=msnyder@specifix.com \
    --cc=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    --cc=mark.kettenis@xs4all.nl \
    /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