Re: [PATCH 5/5] target/riscv/cpu_helper.c: fix bad_shift in riscv_cpu_interrupt()

2025-01-28 Thread Alistair Francis
On Wed, Jan 22, 2025 at 4:49 AM Daniel Henrique Barboza wrote: > > Coverity reported a BAD_SHIFT issue in the following code: > > > 2097 > CID 1590355: Integer handling issues (BAD_SHIFT) > In expression "hdeleg >> cause", right shifting by more than 63 >bits has u

[PATCH 5/5] target/riscv/cpu_helper.c: fix bad_shift in riscv_cpu_interrupt()

2025-01-21 Thread Daniel Henrique Barboza
Coverity reported a BAD_SHIFT issue in the following code: > 2097 CID 1590355: Integer handling issues (BAD_SHIFT) In expression "hdeleg >> cause", right shifting by more than 63 bits has undefined behavior. The shift amount, "cause", is at least 64. > 2098