qemu-e2k/target/xtensa
Peter Maydell ad18376b90 target/xtensa: Assert that interrupt level is within bounds
In handle_interrupt() we use level as an index into the interrupt_vector[]
array. This is safe because we have checked it against env->config->nlevel,
but Coverity can't see that (and it is only true because each CPU config
sets its XCHAL_NUM_INTLEVELS to something less than MAX_NLEVELS), so it
complains about a possible array overrun (CID 1507131)

Add an assert() which will make Coverity happy and catch the unlikely
case of a mis-set XCHAL_NUM_INTLEVELS in future.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
Message-id: 20230623154135.1930261-1-peter.maydell@linaro.org
2023-07-06 13:26:43 +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/xtensa: Remove NB_MMU_MODES define 2023-03-13 06:44:37 -07:00
cpu-qom.h target/xtensa: Convert to 3-phase reset 2022-12-16 15:58:16 +00:00
cpu.c target/xtensa/cpu: Include missing "memory.h" header 2023-02-27 22:29:01 +01:00
cpu.h target: Widen pc/cs_base in cpu_get_tb_cpu_state 2023-06-26 17:32:59 +02:00
dbg_helper.c
exc_helper.c target/xtensa: Assert that interrupt level is within bounds 2023-07-06 13:26:43 +01:00
fpu_helper.c
gdbstub.c gdbstub: move register helpers into standalone include 2023-03-07 20:44:08 +00:00
helper.c gdbstub: move register helpers into standalone include 2023-03-07 20:44:08 +00:00
helper.h
import_core.sh gdbstub: move register helpers into standalone include 2023-03-07 20:44:08 +00:00
Kconfig
meson.build meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
mmu_helper.c
monitor.c
op_helper.c
overlay_tool.h
translate.c accel/tcg: Introduce translator_io_start 2023-06-05 12:04:29 -07:00
win_helper.c
xtensa-isa-internal.h
xtensa-isa.c
xtensa-isa.h
xtensa-semi.c