Hi Alistair,
On 3/12/24 07:31, Alistair Francis wrote:
On Thu, Nov 28, 2024 at 7:39 PM Peter Maydell wrote:
In riscv_cpu_do_interrupt() we use the 'cause' value we got out of
cs->exception as a shift value. However this value can be larger
than 31, which means that "1 << cause" is undefined
On Thu, Nov 28, 2024 at 7:39 PM Peter Maydell wrote:
>
> In riscv_cpu_do_interrupt() we use the 'cause' value we got out of
> cs->exception as a shift value. However this value can be larger
> than 31, which means that "1 << cause" is undefined behaviour,
> because we do the shift on an 'int' typ
On 12/2/24 07:46, Peter Maydell wrote:
On Thu, 28 Nov 2024 at 12:59, Richard Henderson
wrote:
On 11/28/24 04:38, Peter Maydell wrote:
In riscv_cpu_do_interrupt() we use the 'cause' value we got out of
cs->exception as a shift value. However this value can be larger
than 31, which means that
On Thu, Nov 28, 2024 at 7:39 PM Peter Maydell wrote:
>
> In riscv_cpu_do_interrupt() we use the 'cause' value we got out of
> cs->exception as a shift value. However this value can be larger
> than 31, which means that "1 << cause" is undefined behaviour,
> because we do the shift on an 'int' typ
On Thu, 28 Nov 2024 at 12:59, Richard Henderson
wrote:
>
> On 11/28/24 04:38, Peter Maydell wrote:
> > In riscv_cpu_do_interrupt() we use the 'cause' value we got out of
> > cs->exception as a shift value. However this value can be larger
> > than 31, which means that "1 << cause" is undefined be
On 11/28/24 04:38, Peter Maydell wrote:
In riscv_cpu_do_interrupt() we use the 'cause' value we got out of
cs->exception as a shift value. However this value can be larger
than 31, which means that "1 << cause" is undefined behaviour,
because we do the shift on an 'int' type.
This causes the un
On Thu, 28 Nov 2024 at 11:20, Daniel Henrique Barboza
wrote:
>
>
>
> On 11/28/24 7:38 AM, Peter Maydell wrote:
> > In riscv_cpu_do_interrupt() we use the 'cause' value we got out of
> > cs->exception as a shift value. However this value can be larger
> > than 31, which means that "1 << cause" is
On 11/28/24 7:38 AM, Peter Maydell wrote:
In riscv_cpu_do_interrupt() we use the 'cause' value we got out of
cs->exception as a shift value. However this value can be larger
than 31, which means that "1 << cause" is undefined behaviour,
because we do the shift on an 'int' type.
This causes t
In riscv_cpu_do_interrupt() we use the 'cause' value we got out of
cs->exception as a shift value. However this value can be larger
than 31, which means that "1 << cause" is undefined behaviour,
because we do the shift on an 'int' type.
This causes the undefined behaviour sanitizer to complain
on