From: Tom Tromey <tom@tromey.com>
To: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
Cc: Tom de Vries <tdevries@suse.de>
Subject: Re: [PATCH] [gdb/build] Fix Wstringop-truncation in coff_getfilename
Date: Wed, 26 Jul 2023 07:45:22 -0600 [thread overview]
Message-ID: <87o7jykcr1.fsf@tromey.com> (raw)
In-Reply-To: <20230726084909.32090-1-tdevries@suse.de> (Tom de Vries via Gdb-patches's message of "Wed, 26 Jul 2023 10:49:09 +0200")
>>>>> "Tom" == Tom de Vries via Gdb-patches <gdb-patches@sourceware.org> writes:
Tom> When building gdb with -O2 -fsanitize-threads, I ran into
Tom> a Werror=stringop-truncation.
...
Tom> Fix this by using "sizeof (aux_entry->x_file.x_n.x_fname)" instead.
Tom> Likewise in xcoffread.c.
Tom> Tested on x86_64-linux.
This seems fine to me. I wonder why this code is using a fixed-size
buffer, but your fix is clearly an improvement anyway.
Approved-By: Tom Tromey <tom@tromey.com>
Tom
prev parent reply other threads:[~2023-07-26 13:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-26 8:49 Tom de Vries
2023-07-26 13:45 ` 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=87o7jykcr1.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).