From: Tom de Vries <tdevries@suse.de>
To: Matthieu Longo <matthieu.longo@arm.com>,
gdb-patches@sourceware.org, Tom Tromey <tom@tromey.com>
Cc: Andrew Burgess <aburgess@redhat.com>
Subject: Re: [PATCH v1] gdb/python: fix memory leak in gdb_py_tp_name
Date: Fri, 5 Jun 2026 12:06:59 +0200 [thread overview]
Message-ID: <247ba966-7850-4067-8017-8b35d1a6a74c@suse.de> (raw)
In-Reply-To: <20260526160459.270322-1-matthieu.longo@arm.com>
On 5/26/26 6:04 PM, Matthieu Longo wrote:
> @@ -1067,7 +1067,7 @@ bppy_init (PyObject *self, PyObject *args, PyObject *kwargs)
> static PyObject *
> bppy_repr (PyObject *self)
> {
> - const char *tp_name = gdbpy_py_obj_tp_name (self);
> + const auto &tp_name = gdbpy_py_obj_tp_name (self);
>
> const auto bp = (struct gdbpy_breakpoint_object*) self;
> if (bp->bp == nullptr)
> @@ -1083,7 +1083,7 @@ bppy_repr (PyObject *self)
> str.pop_back ();
>
> return PyUnicode_FromFormat ("<%s%s number=%d hits=%d%s>",
> - tp_name,
> + tp_name.c_str (),
> (bp->bp->enable_state == bp_enabled
> ? "" : " disabled"), bp->bp->number,
> bp->bp->hit_count, str.c_str ());
This updates the second use of tp_name, but not the first, which caused
a build breaker with clang. I've submitted a fix (
https://sourceware.org/pipermail/gdb-patches/2026-June/227823.html ).
Thanks,
- Tom
prev parent reply other threads:[~2026-06-05 10:07 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-26 16:04 Matthieu Longo
2026-05-26 16:35 ` Tom Tromey
2026-05-28 12:46 ` Matthieu Longo
2026-05-28 16:43 ` Tom Tromey
2026-05-28 17:08 ` Matthieu Longo
2026-05-28 19:00 ` Tom Tromey
2026-05-29 10:08 ` Matthieu Longo
2026-05-29 10:52 ` Andrew Burgess
2026-05-29 13:09 ` Tom Tromey
2026-06-01 9:57 ` Matthieu Longo
2026-06-02 9:36 ` Andrew Burgess
2026-06-02 14:22 ` Tom Tromey
2026-06-03 16:30 ` Matthieu Longo
2026-06-04 9:30 ` Andrew Burgess
2026-06-05 20:49 ` Tom Tromey
2026-06-08 10:31 ` Matthieu Longo
2026-06-08 18:51 ` Andrew Burgess
2026-06-05 10:06 ` Tom de Vries [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=247ba966-7850-4067-8017-8b35d1a6a74c@suse.de \
--to=tdevries@suse.de \
--cc=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=matthieu.longo@arm.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