Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@redhat.com>
To: "Rohr, Stephan" <stephan.rohr@intel.com>, Tom Tromey <tom@tromey.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: RE: [PATCH 1/1] gdb: set the cache information in 'get_prev_frame_maybe_check_cycle'
Date: Tue, 07 Jul 2026 16:04:33 +0100	[thread overview]
Message-ID: <87o6giu9ha.fsf@redhat.com> (raw)
In-Reply-To: <DS7PR11MB624747A2EBDCBB13413DD44E93F02@DS7PR11MB6247.namprd11.prod.outlook.com>

"Rohr, Stephan" <stephan.rohr@intel.com> writes:

> Hello Andrew,
>
> I think changing 'get_prev_frame_raw' to return a raw pointer
> and changing 'compute_frame_id' to accept a raw pointer seems
> reasonable.
>
> I was hesitant to propose this change as calling
> 'frame_unwind_find_by_frame' in 'compute_frame_id' requires
> a frame_info_ptr.  Same for ' fi->unwind->this_id (..)'.  It feels wrong
> to create a temporary frame_info_ptr for these calls, though I observed
> similar patterns, e.g., as done in 'create_new_frame'.

Yeah, after sending the email I started implementing this change and ran
into this exact case.  I agree that changing frame_unwind_find_by_frame
probably isn't going to be ideal right now, so I think my original
suggestion might be the way to go.

I think long term it might be right to downgrade some part of the frame
building API back to raw frame_info pointers, but I think this will need
some wider changes to prevent those pointers becoming invalidated,
e.g. frame_unwind_find_by_frame can invoke Python code, which can then
invalidate the frame cache (yuck), and though that probably is never
going to do anything useful, right now we run into problems reinflating
(due to missing frame-ids), and if we switch to raw frame_info pointer
we end up with use after free issues.

I'll go through your feedback to my earlier patch, and write up a commit
message and repost it shortly.

Thanks,
Andrew


      reply	other threads:[~2026-07-07 15:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-25 14:58 [PATCH 0/1] " Stephan Rohr
2026-06-25 14:58 ` [PATCH 1/1] " Stephan Rohr
2026-06-26 15:06   ` Tom Tromey
2026-06-29 14:04     ` Rohr, Stephan
2026-07-06 15:06       ` Andrew Burgess
2026-07-07  7:57         ` Rohr, Stephan
2026-07-07 16:04           ` Andrew Burgess
2026-07-08  8:46             ` Rohr, Stephan
2026-07-08 13:59               ` Andrew Burgess
2026-07-08 15:18                 ` Rohr, Stephan
2026-07-14 15:14                   ` Andrew Burgess
2026-07-15  7:33                     ` Rohr, Stephan
2026-07-18 11:57                       ` Andrew Burgess
2026-07-20 17:39             ` Tom Tromey
2026-07-07 10:33       ` Andrew Burgess
2026-07-07 12:25         ` Rohr, Stephan
2026-07-07 15:04           ` Andrew Burgess [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=87o6giu9ha.fsf@redhat.com \
    --to=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=stephan.rohr@intel.com \
    --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