From: Tom de Vries <tdevries@suse.de>
To: Simon Marchi <simark@simark.ca>, Tom Tromey <tromey@adacore.com>,
gdb-patches@sourceware.org
Subject: Re: [PATCH 00/10] Mildly better refcount safety for Python
Date: Fri, 15 May 2026 14:37:08 +0200 [thread overview]
Message-ID: <6aebb3c7-0dee-4502-a766-4d3dfaba1f85@suse.de> (raw)
In-Reply-To: <fcb66f53-7243-42f5-9336-e322cb6efe43@simark.ca>
On 2/21/26 3:31 AM, Simon Marchi wrote:
>
>
> On 2026-02-20 16:03, Tom Tromey wrote:
>> This series converts a number of gdb-to-Python converion functions to
>> return a gdbpy_ref<> rather than returning a PyObject* and then simply
>> documenting that a new reference is returned.
>>
>> The hope is that this will make refcount mistakes less likely.
>>
>> Regression tested on x86-64 Fedora 43.
>>
>> Signed-off-by: Tom Tromey <tromey@adacore.com>
>
> I don't know if someone else wants to review this, but I think this is
> good. I think it's good if the references are managed from the point
> where we get them from the Python API to the point where we release them
> to the Python API.
>
> I gave it a quick look, since it's very mechanical and I probably
> wouldn't spot mistakes anyway. But I asked Claude to review and it said
> it looked good. It even noted that you fixed a ref leak in the symbol
> patch.
>
> Approved-By: Simon Marchi <simon.marchi@efficios.com>
Hi,
I'd like to ask, is there anything holding back committing this patch
series?
I'm working on a v3 of this (
https://sourceware.org/pipermail/gdb-patches/2026-May/227374.html )
patches series, and realized I'm touching the same code.
FWIW, I asked Gemini Pro 3.1 to review this patch series, and it found
the fixed ref leak Simon mentions, and no problems.
[ It also reported another fixed ref leak, which turned out to be
incorrect. ]
Thanks,
- Tom
next prev parent reply other threads:[~2026-05-15 12:37 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-20 21:03 Tom Tromey
2026-02-20 21:03 ` [PATCH 01/10] Return gdbpy_ref<> from symtab_and_line_to_sal_object Tom Tromey
2026-02-21 1:58 ` Simon Marchi
2026-02-21 2:13 ` Simon Marchi
2026-02-21 22:33 ` Tom Tromey
2026-02-23 12:28 ` Tom Tromey
2026-02-20 21:03 ` [PATCH 02/10] Return gdbpy_ref<> from symbol_to_symbol_object Tom Tromey
2026-02-21 2:28 ` Simon Marchi
2026-02-21 22:35 ` Tom Tromey
2026-02-20 21:03 ` [PATCH 03/10] Return gdbpy_ref<> from symtab_to_symtab_object Tom Tromey
2026-02-20 21:03 ` [PATCH 04/10] Return gdbpy_ref<> from block_to_block_object Tom Tromey
2026-02-20 21:03 ` [PATCH 05/10] Return gdbpy_ref<> from value_to_value_object Tom Tromey
2026-02-20 21:03 ` [PATCH 06/10] Return gdbpy_ref<> from type_to_type_object Tom Tromey
2026-02-20 21:03 ` [PATCH 07/10] Return gdbpy_ref<> from frame_info_to_frame_object Tom Tromey
2026-02-20 21:03 ` [PATCH 08/10] Return gdbpy_ref<> from symtab_to_linetable_object Tom Tromey
2026-02-20 21:03 ` [PATCH 09/10] Return gdbpy_ref<> from gdbarch_to_arch_object Tom Tromey
2026-02-20 21:03 ` [PATCH 10/10] Return gdbpy_ref<> from gdbpy_registry::lookup Tom Tromey
2026-02-21 2:31 ` [PATCH 00/10] Mildly better refcount safety for Python Simon Marchi
2026-05-15 12:37 ` Tom de Vries [this message]
2026-05-15 17:04 ` Tom Tromey
2026-05-15 17:39 ` Tom de Vries
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=6aebb3c7-0dee-4502-a766-4d3dfaba1f85@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
--cc=simark@simark.ca \
--cc=tromey@adacore.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