From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>,
Chris Moller <cmoller@redhat.com>
Subject: Re: [patch] Fix crash on conditional watchpoints (PR 11371)
Date: Tue, 17 Aug 2010 21:15:00 -0000 [thread overview]
Message-ID: <201008172215.25383.pedro@codesourcery.com> (raw)
In-Reply-To: <201008172214.10329.pedro@codesourcery.com>
On Tuesday 17 August 2010 22:14:09, Pedro Alves wrote:
> > > +static void
> > > +decref_bp_location (struct bp_location **blp)
> > > +{
> >
> > I miss here some:
> > gdb_assert ((*blp)->refc > 0);
>
> Whoops, only after committing have I noticed that I forgot to
> add this, so I added it with the obvious followup patch.
For completeness, here it is. I tested it on x86_64-linux.
--
Pedro Alves
gdb/
2010-08-17 Pedro Alves <pedro@codesourcery.com>
PR breakpoints/11371
* breakpoint.c (decref_bp_location): Assert the reference count is
sane.
---
gdb/breakpoint.c | 2 ++
1 file changed, 2 insertions(+)
Index: src/gdb/breakpoint.c
===================================================================
--- src.orig/gdb/breakpoint.c 2010-08-17 21:55:29.000000000 +0100
+++ src/gdb/breakpoint.c 2010-08-17 22:03:06.000000000 +0100
@@ -5423,6 +5423,8 @@ incref_bp_location (struct bp_location *
static void
decref_bp_location (struct bp_location **blp)
{
+ gdb_assert ((*blp)->refc > 0);
+
if (--(*blp)->refc == 0)
free_bp_location (*blp);
*blp = NULL;
prev parent reply other threads:[~2010-08-17 21:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-11 20:21 Jan Kratochvil
2010-08-14 2:38 ` Pedro Alves
2010-08-15 12:08 ` Jan Kratochvil
2010-08-17 21:14 ` Pedro Alves
2010-08-17 21:15 ` Pedro Alves [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=201008172215.25383.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=cmoller@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).