]> git.proxmox.com Git - mirror_qemu.git/commit
accel/tcg: Fix undefined shift in store_whole_le16
authorRichard Henderson <richard.henderson@linaro.org>
Tue, 6 Jun 2023 17:16:29 +0000 (10:16 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 6 Jun 2023 19:11:02 +0000 (12:11 -0700)
commitc0dde5fc5ccce56b69095bc29af72987efd65d1e
treef0b22dbba59b83a3ee8c9366cc0c65f0b9992437
parent80bdd58ae41ee7f65081c33e5f96cd6033da8337
accel/tcg: Fix undefined shift in store_whole_le16

The computation is documented as unused in this case,
but triggers an ubsan error:

../accel/tcg/ldst_atomicity.c.inc:837:33: runtime error: shift exponent -32 is negative
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../accel/tcg/ldst_atomicity.c.inc:837:33 in

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20230606171629.98157-1-richard.henderson@linaro.org>
accel/tcg/ldst_atomicity.c.inc