From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Paul Pluzhnikov <ppluzhnikov@google.com>
Subject: Re: [patch] Fix leak of bp_jit_event breakpoints
Date: Wed, 19 Jan 2011 21:14:00 -0000 [thread overview]
Message-ID: <201101191409.17445.pedro@codesourcery.com> (raw)
In-Reply-To: <20110119204315.0A235190C48@elbrus2.mtv.corp.google.com>
On Wednesday 19 January 2011 13:43:15, Paul Pluzhnikov wrote:
> @@ -10588,11 +10588,12 @@ breakpoint_re_set_one (void *bint)
> printf_filtered (_("Deleting unknown breakpoint type %d\n"),
> b->type); /* fall through */
> /* Delete overlay event and longjmp master breakpoints; they will be
> - reset later by breakpoint_re_set. */
> + reset later by breakpoint_re_set. Likewise for jit_event. */
> case bp_overlay_event:
> case bp_longjmp_master:
> case bp_std_terminate_master:
> case bp_exception_master:
> + case bp_jit_event:
> delete_breakpoint (b);
> break;
>
> @@ -10619,7 +10620,6 @@ breakpoint_re_set_one (void *bint)
> case bp_longjmp_resume:
> case bp_exception:
> case bp_exception_resume:
> - case bp_jit_event:
> break;
> }
This part doesn't look quite right. In non-stop (breakpoint always-inserted)
mode, this looks it will create a race window where you delete the jit event
breakpoint whenever a random thread loads/unloads a DSO, meaning
you could miss a jit registration done by some other thread still running.
--
Pedro Alves
next prev parent reply other threads:[~2011-01-19 21:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-19 20:49 Paul Pluzhnikov
2011-01-19 21:14 ` Pedro Alves [this message]
2011-01-20 7:17 ` Paul Pluzhnikov
2011-01-21 1:11 ` Paul Pluzhnikov
2011-01-26 19:48 ` Paul Pluzhnikov
2011-01-27 14:15 ` Pedro Alves
2011-01-27 22:59 ` Paul Pluzhnikov
2011-01-28 1:27 ` Pedro Alves
2011-01-28 18:02 ` Paul Pluzhnikov
2011-01-28 20:38 ` Pedro Alves
2011-01-31 22:00 ` Paul Pluzhnikov
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=201101191409.17445.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=ppluzhnikov@google.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).