From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Subject: Re: [PATCH] tests/tcg: Suppress compiler false-positive warning on sha1.c
Date: Thu, 27 Feb 2025 08:35:36 -0800 [thread overview]
Message-ID: <1c3acde9-9540-4a23-97dd-dc28dcd77f5f@linaro.org> (raw)
In-Reply-To: <20250227141343.1675415-1-peter.maydell@linaro.org>
On 2/27/25 06:13, Peter Maydell wrote:
> GCC versions at least 12 through 15 incorrectly report a warning
> about code in sha1.c:
>
> tests/tcg/multiarch/sha1.c:161:13: warning: ‘SHA1Transform’ reading 64 bytes from a region of size 0 [-Wstringop-overread]
> 161 | SHA1Transform(context->state, &data[i]);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> This is a piece of stock library code for doing SHA1 which we've
> simply copied, rather than writing ourselves. The bug has been
> reported to upstream GCC (about a different library's use of this
> code):
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106709
>
> For our test case, since this isn't our original code and there isn't
> actually a bug in it, suppress the incorrect warning rather than
> trying to modify the code to work around the compiler issue.
>
> Resolves:https://gitlab.com/qemu-project/qemu/-/issues/2328
> Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
> ---
> tests/tcg/aarch64/Makefile.target | 3 ++-
> tests/tcg/arm/Makefile.target | 3 ++-
> tests/tcg/multiarch/Makefile.target | 8 ++++++++
> 3 files changed, 12 insertions(+), 2 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
next prev parent reply other threads:[~2025-02-27 16:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-27 14:13 [PATCH] tests/tcg: Suppress compiler false-positive warning on sha1.c Peter Maydell
2025-02-27 16:35 ` Richard Henderson [this message]
2025-02-27 22:23 ` Alex Bennée
2025-03-04 11:56 ` Alex Bennée
2025-03-04 12:51 ` Peter Maydell
2025-03-04 13:44 ` Alex Bennée
2025-03-04 13:53 ` Peter Maydell
2025-03-04 14:29 ` Alex Bennée
2025-03-04 14:36 ` Peter Maydell
2025-03-04 15:58 ` Alex Bennée
2025-03-05 14:56 ` Brian Cain
2025-03-05 16:52 ` Peter Maydell
2025-03-05 16:56 ` Alex Bennée
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=1c3acde9-9540-4a23-97dd-dc28dcd77f5f@linaro.org \
--to=richard.henderson@linaro.org \
--cc=qemu-devel@nongnu.org \
/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 NNTP newsgroup(s).