From: Tom Tromey <tom@tromey.com>
To: Andrew Burgess <aburgess@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdbserver: fix memory leak in vRun handling
Date: Thu, 19 Nov 2026 13:38:21 -0700 [thread overview]
Message-ID: <877bi8zhdu.fsf@tromey.com> (raw)
In-Reply-To: <1f52ddf6fec78fe15933d75609a09a1fcdc471a5.1795001077.git.aburgess@redhat.com> (Andrew Burgess's message of "Wed, 18 Nov 2026 11:24:59 +0000")
>>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:
Andrew> Fix this by creating the buffer as gdb::unique_xmalloc_ptr<char>. The
Andrew> decode_v_run_arg function already returned its results as a
Andrew> gdb::unique_xmalloc_ptr<char>, but this was previously created at the
Andrew> return point, now we just create it earlier.
Makes sense to me.
FWIW this is one kind of patch I'd approve without a test case.
I suppose my reason is that the patch is pretty obviously correct; and
regression testing for any leak fix is probably both prohibitively
difficult and also low-value in a way.
To be clear, I'm not saying I mind the test, either. One area gdb is
somewhat deficient is coverage of the error() calls.
thanks,
Tom
prev parent reply other threads:[~2026-11-19 20:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 11:24 Andrew Burgess
2026-11-19 20:23 ` Keith Seitz
2026-11-23 14:45 ` Andrew Burgess
2026-11-19 20:38 ` Tom Tromey [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=877bi8zhdu.fsf@tromey.com \
--to=tom@tromey.com \
--cc=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
/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