From: Simon Marchi <simon.marchi@efficios.com>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/4] gdb/python: check for nullptr before calling evpy_add_attribute
Date: Mon, 14 Sep 2026 15:43:47 -0400 [thread overview]
Message-ID: <0423d0d7-81fd-4ab1-946a-35620ec02c01@efficios.com> (raw)
In-Reply-To: <87ik47ws9w.fsf@tromey.com>
On 9/14/26 3:24 PM, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:
>
> Simon> Found by Claude while I was reviewing some patches: gdbpy_borrowed_ref's
> Simon> constructor asserts that the object is not nullptr. Some call sites can
> Simon> in theory pass nullptr (although very unlikely, only on memory
> Simon> allocation failure kind of errors), fix them.
>
> It's an oversight that these weren't already checked, and probably they
> are all latent bugs.
>
> This is the kind of thing the safety API prevents, but (1) that's mostly
> on hold pending Longo's work; and (2) we aren't really ready to switch
> over the event stuff fully anyway (or at least for me it's one of the
> last things to do).
Ack. It's not super important, but it's also easy to fix, so why not.
Simon
prev parent reply other threads:[~2026-09-14 19:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 19:19 Simon Marchi
2026-09-14 19:19 ` [PATCH 2/4] gdb/python: collapse some nested ifs Simon Marchi
2026-09-14 19:35 ` Tom Tromey
2026-09-14 19:46 ` Simon Marchi
2026-09-14 19:19 ` [PATCH 3/4] gdb/python: rename evregpy_no_listeners_p to evregpy_has_listeners_p Simon Marchi
2026-09-14 19:38 ` Tom Tromey
2026-09-14 19:19 ` [PATCH 4/4] gdb/python: remove more useless casts Simon Marchi
2026-09-14 19:39 ` Tom Tromey
2026-09-14 19:47 ` Simon Marchi
2026-09-14 19:24 ` [PATCH 1/4] gdb/python: check for nullptr before calling evpy_add_attribute Tom Tromey
2026-09-14 19:43 ` Simon Marchi [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=0423d0d7-81fd-4ab1-946a-35620ec02c01@efficios.com \
--to=simon.marchi@efficios.com \
--cc=gdb-patches@sourceware.org \
--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