From: Tom Tromey <tom@tromey.com>
To: Stephan Rohr <stephan.rohr@intel.com>
Cc: gdb-patches@sourceware.org, tom@tromey.com, guinevere@redhat.com
Subject: Re: [PATCH v3 1/1] gdb: fix assert after register write failure
Date: Fri, 06 Nov 2026 12:01:05 -0700 [thread overview]
Message-ID: <877bipwzri.fsf@tromey.com> (raw)
In-Reply-To: <20261104130344.44218-2-stephan.rohr@intel.com> (Stephan Rohr's message of "Wed, 4 Nov 2026 13:03:44 +0000")
>>>>> Stephan Rohr <stephan.rohr@intel.com> writes:
> From: Eduard Sargsyan <eduard.sargsyan@intel.com>
> GDB tries to invalidate the register cache if a write to a register fails.
> In case the connection to a remote inferior is closed during the write,
> the remote target is unpushed, which deletes the regcache. GDB receives
> a TARGET_CLOSE_ERROR. With this, the regcache is deleted and GDB runs
> into a use-after-free bug; the previously set up make_scope_exit
> invalidator writes to the already deleted regcache.
> Fix this by catching the exception and only invalidating the regcache
> if the error is not a TARGET_CLOSE_ERROR.
Thanks for doing this. I think this is ok.
Approved-By: Tom Tromey <tom@tromey.com>
Tom
next prev parent reply other threads:[~2026-11-06 19:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 13:03 [PATCH v3 0/1] " Stephan Rohr
2026-11-04 13:03 ` [PATCH v3 1/1] " Stephan Rohr
2026-11-06 19:01 ` Tom Tromey [this message]
2026-11-09 19:03 ` Tom Tromey
2026-11-06 19:06 ` [PATCH v3 0/1] " Tom Tromey
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=877bipwzri.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=guinevere@redhat.com \
--cc=stephan.rohr@intel.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