Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@redhat.com>
To: Tom Tromey <tromey@adacore.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Add null check for character type name
Date: Tue, 3 Feb 2026 12:58:42 -0800	[thread overview]
Message-ID: <aea676b1-4eac-4e5d-ac26-1ff84ba03a6a@redhat.com> (raw)
In-Reply-To: <20260203202727.229977-1-tromey@adacore.com>

Hi,

On 2/3/26 12:27 PM, Tom Tromey wrote:
> The internal AdaCore test suite found that
> wchar_printer::get_default_encoding checks the name of a type without
> first seeing if the name is null:
> 
>    else if (streq (chtype->name (), "wchar_t"))
> 
> Mysteriously, though, this only seems to happen for certain targets
> and perhaps only under certain conditions (I couldn't reproduce it
> msyelf).
> 
> I felt that the fix is fairly obvious and that this isn't really worth
> writing a test for.  However I can write one using the DWARF assembler
> if someone feels it is worthwhile.

I don't mind not having a test. IMO, we shouldn't be so super-strict
about needing tests for literally everything -- especially trivial
defensive programming patches like this.

Keith


      reply	other threads:[~2026-02-03 20:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-03 20:27 Tom Tromey
2026-02-03 20:58 ` Keith Seitz [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=aea676b1-4eac-4e5d-ac26-1ff84ba03a6a@redhat.com \
    --to=keiths@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --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