From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: Max Filippov <jcmvbkbc@gmail.com>
Subject: Re: [PATCH] target/xtensa: Correct assert condition in handle_interrupt()
Date: Wed, 31 Jul 2024 23:10:00 +0200 [thread overview]
Message-ID: <e087a52e-bc14-4238-8524-63af1a6d5bb1@linaro.org> (raw)
In-Reply-To: <20240731172246.3682311-1-peter.maydell@linaro.org>
On 31/7/24 19:22, Peter Maydell wrote:
> In commit ad18376b90c8101 we added an assert that the level value was
> in-bounds for the array we're about to index into. However, the
> assert condition is wrong -- env->config->interrupt_vector is an
> array of uint32_t, so we should bounds check the index against
> ARRAY_SIZE(...), not against sizeof().
>
> Resolves: Coverity CID 1507131
> Fixes: ad18376b90c8101 ("target/xtensa: Assert that interrupt level is within bounds")
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> Spotted because Coverity (correctly) thought the issue was still
> outstanding.
> ---
> target/xtensa/exc_helper.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
prev parent reply other threads:[~2024-07-31 21:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-31 17:22 [PATCH] target/xtensa: Correct assert condition in handle_interrupt() Peter Maydell
2024-07-31 17:41 ` Max Filippov
2024-07-31 21:10 ` Philippe Mathieu-Daudé [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=e087a52e-bc14-4238-8524-63af1a6d5bb1@linaro.org \
--to=philmd@linaro.org \
--cc=jcmvbkbc@gmail.com \
--cc=peter.maydell@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).