From: Daniel Jacobowitz <drow@false.org>
To: Douglas Evans <dje@google.com>
Cc: gdb@sourceware.org
Subject: Re: linux-thread-db.c not only caller of add_thread, -> gdb segv
Date: Fri, 09 Nov 2007 14:02:00 -0000 [thread overview]
Message-ID: <20071109140225.GA32113@caradoc.them.org> (raw)
In-Reply-To: <e394668d0711082038r412087eaj3b0cda56cdddaff0@mail.gmail.com>
On Thu, Nov 08, 2007 at 08:38:13PM -0800, Douglas Evans wrote:
> Hi. I'm trying to decide what's the best way to fix a bug I've found.
> linux-thread-db.c is not the only caller of add_thread, e.g. infrun.c
> calls it too.
This is true. But if you're using the Linux native target, and reach
the point where any of the other add_thread calls are made, then
there's already a bug. It is supposed to detect all new threads.
It sort of has to - that's how infrun gets the new ptid_t.
> I can see two solutions
> 1) ensure all calls to add_thread properly initialize thread_info.private
> (via callback or whatever)
> 2) have linux-thread-db.c always check thread_info.private before
> dereferencing it.
3) Figure out how you got to any of the other add_thread calls.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2007-11-09 14:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-09 4:38 Douglas Evans
2007-11-09 14:02 ` Daniel Jacobowitz [this message]
2007-11-10 1:27 ` Douglas Evans
2007-11-10 3:26 ` Daniel Jacobowitz
2007-11-10 3:40 ` Douglas Evans
2007-11-10 5:20 ` Douglas Evans
2007-11-10 16:00 ` Daniel Jacobowitz
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=20071109140225.GA32113@caradoc.them.org \
--to=drow@false.org \
--cc=dje@google.com \
--cc=gdb@sourceware.org \
/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