qemu/target/xtensa
Peter Maydell 5e8e4f098d target/xtensa: Correct assert condition in handle_interrupt()
In commit ad18376b90 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: ad18376b90 ("target/xtensa: Assert that interrupt level is within bounds")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20240731172246.3682311-1-peter.maydell@linaro.org
2024-08-01 10:59:01 +01:00
..
core-dc232b
core-dc233c
core-de212
core-de233_fpu
core-dsp3400
core-fsf
core-lx106
core-sample_controller
core-test_kc705_be
core-test_mmuhifi_c3
core-dc232b.c gdbstub: move register helpers into standalone include 2023-03-07 20:44:08 +00:00
core-dc233c.c gdbstub: move register helpers into standalone include 2023-03-07 20:44:08 +00:00
core-de212.c gdbstub: move register helpers into standalone include 2023-03-07 20:44:08 +00:00
core-de233_fpu.c gdbstub: move register helpers into standalone include 2023-03-07 20:44:08 +00:00
core-dsp3400.c gdbstub: move register helpers into standalone include 2023-03-07 20:44:08 +00:00
core-fsf.c gdbstub: move register helpers into standalone include 2023-03-07 20:44:08 +00:00
core-lx106.c gdbstub: move register helpers into standalone include 2023-03-07 20:44:08 +00:00
core-sample_controller.c gdbstub: move register helpers into standalone include 2023-03-07 20:44:08 +00:00
core-test_kc705_be.c gdbstub: move register helpers into standalone include 2023-03-07 20:44:08 +00:00
core-test_mmuhifi_c3.c gdbstub: move register helpers into standalone include 2023-03-07 20:44:08 +00:00
cores.list
cpu-param.h target: Define TCG_GUEST_DEFAULT_MO in 'cpu-param.h' 2024-04-26 15:31:37 +02:00
cpu-qom.h target: Move ArchCPUClass definition to 'cpu.h' 2023-11-07 13:08:48 +01:00
cpu.c target: Set TCGCPUOps::cpu_exec_halt to target's has_work implementation 2024-07-11 11:41:34 +01:00
cpu.h target: Define TCG_GUEST_DEFAULT_MO in 'cpu-param.h' 2024-04-26 15:31:37 +02:00
dbg_helper.c target/xtensa: Prefer fast cpu_env() over slower CPU QOM cast macro 2024-03-12 12:04:25 +01:00
exc_helper.c target/xtensa: Correct assert condition in handle_interrupt() 2024-08-01 10:59:01 +01:00
fpu_helper.c target/helpers: Remove unnecessary 'qemu/main-loop.h' header 2023-08-31 19:47:43 +02:00
gdbstub.c target/xtensa: Prefer fast cpu_env() over slower CPU QOM cast macro 2024-03-12 12:04:25 +01:00
helper.c target/xtensa: Prefer fast cpu_env() over slower CPU QOM cast macro 2024-03-12 12:04:25 +01:00
helper.h
import_core.sh gdbstub: move register helpers into standalone include 2023-03-07 20:44:08 +00:00
Kconfig target/xtensa: Restrict semihosting to TCG 2024-07-22 09:38:14 +01:00
meson.build meson: Rename target_softmmu_arch -> target_system_arch 2023-10-07 19:03:07 +02:00
mmu_helper.c target/xtensa: Make use of 'segment' in pptlb helper less confusing 2024-07-29 16:58:14 +01:00
monitor.c
op_helper.c exec/cpu: Extract page-protection definitions to page-protection.h 2024-05-06 11:17:15 +02:00
overlay_tool.h
translate.c target/xtensa: Use translator_ldub in xtensa_insn_len 2024-05-15 08:55:19 +02:00
win_helper.c target/helpers: Remove unnecessary 'qemu/main-loop.h' header 2023-08-31 19:47:43 +02:00
xtensa-isa-internal.h
xtensa-isa.c
xtensa-isa.h
xtensa-semi.c