From: Toby Lloyd Davies <tlloyddavies@undo.io>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb/infcall: Fix freed frame dereferenced in inferior call
Date: Thu, 11 Jan 2024 18:19:27 +0000 [thread overview]
Message-ID: <CAN092+1cdf6Qz=oVsTY8R-xUDoJ1M59jQd3iaZX7PewUsxLvDA@mail.gmail.com> (raw)
In-Reply-To: <87le8vrdbg.fsf@tromey.com>
> Was this patch made against an older version of gdb?
Yes. You're right that this is now fixed so this patch is no longer needed.
Thanks,
Toby
On Thu, 11 Jan 2024 at 17:26, Tom Tromey <tom@tromey.com> wrote:
>
> >>>>> "Toby" == Toby Lloyd Davies <tlloyddavies@undo.io> writes:
>
> Toby> Between the store to frame and it's use by get_frame_sp (frame) there is
> Toby> a call to find_function_addr(). If the function is a IFUNC then this can
> Toby> do another inferior call. This results in the frame cache being
> Toby> invalidated which frees all frames. Then the frame pointer previously
> Toby> stored is left dangling and get_frame_sp (frame) may segfault.
>
> This sounds like exactly the kind of bug that should have been fixed by
> the frame_info_ptr change -- stale frame_info pointer are no longer
> possible.
>
> Was this patch made against an older version of gdb?
>
> If it's still a bug, it might be good to have more information about it.
> Also a test case would be handy.
>
> thanks,
> Tom
prev parent reply other threads:[~2024-01-11 18:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-11 16:38 Toby Lloyd Davies
2024-01-11 17:26 ` Tom Tromey
2024-01-11 18:19 ` Toby Lloyd Davies [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='CAN092+1cdf6Qz=oVsTY8R-xUDoJ1M59jQd3iaZX7PewUsxLvDA@mail.gmail.com' \
--to=tlloyddavies@undo.io \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.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).