From: Vladimir Prus <vladimir@codesourcery.com>
To: Pedro Alves <pedro@codesourcery.com>, gdb-patches@sourceware.org
Subject: Re: Fix a couple of multiexec races
Date: Mon, 15 Feb 2010 09:11:00 -0000 [thread overview]
Message-ID: <201002151211.14059.vladimir@codesourcery.com> (raw)
In-Reply-To: <201002081554.31654.pedro@codesourcery.com>
On Monday 08 February 2010 18:54:31 you wrote:
> On Wednesday 13 January 2010 15:11:30, Vladimir Prus wrote:
> >
> > The attached patch fixes a couple of glitches preventing (upcoming)
> > '-exec-run --all' from working.
> >
> > First, consider this code inside linux_nat_wait_1:
> >
> > if (lp
> > && ptid_is_pid (ptid)
> > && ptid_get_pid (lp->ptid) != ptid_get_pid (ptid))
> > {
> >
> > if (debug_linux_nat)
> > fprintf (stderr, "LWP %ld got an event %06x, leaving pending.\n",
> > ptid_get_lwp (lp->ptid), status);
> >
> > if (WIFSTOPPED (lp->status))
> > {
> > if (WSTOPSIG (lp->status) != SIGSTOP)
> > {
> > stop_callback (lp, NULL);
> >
> > /* Resume in order to collect the sigstop. */
> > ptrace (PTRACE_CONT, GET_LWP (lp->ptid), 0, 0);
> >
> > stop_wait_callback (lp, NULL);
> > }
> >
> > Because lp->status is naturally not NULL when calling stop_callback, and because
> > stop_callback has:
> >
> > gdb_assert (lp->status == 0);
> >
> > if we ever enter the inner "if", GDB will crash. Offlist, Pedro suggested the inner if be
> > just removed.
>
> I thought about this some more, and I think this deserves more
> extensive fixing. See patch (and comments in it) below, which
> I've just applied.
Thanks for taking care of this!
--
Vladimir Prus
CodeSourcery
vladimir@codesourcery.com
(650) 331-3385 x722
prev parent reply other threads:[~2010-02-15 9:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-13 15:11 Vladimir Prus
2010-01-13 15:50 ` Pedro Alves
2010-02-08 15:54 ` Pedro Alves
2010-02-15 9:11 ` Vladimir Prus [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=201002151211.14059.vladimir@codesourcery.com \
--to=vladimir@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=pedro@codesourcery.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