From: Tom Tromey <tom@tromey.com>
To: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Cc: Simon Marchi <simon.marchi@efficios.com>
Subject: Re: [PATCH] gdb: fix use-after-free in check_longjmp_breakpoint_for_call_dummy
Date: Tue, 09 May 2023 08:21:38 -0600 [thread overview]
Message-ID: <87cz397fgt.fsf@tromey.com> (raw)
In-Reply-To: <20230508145913.29359-1-simon.marchi@efficios.com> (Simon Marchi via Gdb-patches's message of "Mon, 8 May 2023 10:59:13 -0400")
>>>>> Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
> Commit 7a8de0c33019 ("Remove ALL_BREAKPOINTS_SAFE") introduced a
> use-after-free in the breakpoints iterations (see below for full ASan
> report). This makes gdb.base/stale-infcall.exp fail when GDB is build
> with ASan.
Sorry about that.
> The new code kept the B_TMP variable, but it's not useful in that
> context. We can't go change the next breakpoint as saved by the safe
> iterator, like we did before. I suggest fixing that by saving the
> breakpoints to delete in a map and deleting them all at the end.
Looks good.
Approved-By: Tom Tromey <tom@tromey.com>
Tom
next prev parent reply other threads:[~2023-05-09 14:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-08 14:59 Simon Marchi
2023-05-09 14:21 ` Tom Tromey [this message]
2023-05-09 17:48 ` Simon Marchi
2023-05-10 9:12 ` Andrew Burgess
2023-05-10 11:50 ` Simon Marchi
2023-05-12 10:19 ` Andrew Burgess
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=87cz397fgt.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@efficios.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).