Re: [PATCH] target/xtensa: Correct assert condition in handle_interrupt()

2024-07-31 Thread Philippe Mathieu-Daudé
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 aga

Re: [PATCH] target/xtensa: Correct assert condition in handle_interrupt()

2024-07-31 Thread Max Filippov
On Wed, Jul 31, 2024 at 10:22 AM 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 bo

[PATCH] target/xtensa: Correct assert condition in handle_interrupt()

2024-07-31 Thread Peter Maydell
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(