aboutsummaryrefslogtreecommitdiff
path: root/scripts/qapi/source.py
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2024-07-23 18:24:31 +0100
committerPeter Maydell <peter.maydell@linaro.org>2024-07-29 17:00:20 +0100
commit525650cd71104c046e4260b5acaeb275f520d5c0 (patch)
tree98cc4ecdb6cf6f10d2333bbfc9323b265f3196e3 /scripts/qapi/source.py
parentbde8adb808eeffb02fdcbd3425f09f1645bdcf4a (diff)
downloadqemu-525650cd71104c046e4260b5acaeb275f520d5c0.zip
qemu-525650cd71104c046e4260b5acaeb275f520d5c0.tar.gz
qemu-525650cd71104c046e4260b5acaeb275f520d5c0.tar.bz2
target/sh4: Avoid shift into sign bit in update_itlb_use()
In update_itlb_use() the variables or_mask and and_mask are uint8_t, which means that in expressions like "and_mask << 24" the usual C arithmetic conversions will result in the shift being done as a signed int type, and so we will shift into the sign bit. For QEMU this isn't undefined behaviour because we use -fwrapv; but we can avoid it anyway by using uint32_t types for or_mask and and_mask. Resolves: Coverity CID 1547628 Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Yoshinori Sato <ysato@users.sourceforge.jp> Message-id: 20240723172431.1757296-1-peter.maydell@linaro.org
Diffstat (limited to 'scripts/qapi/source.py')
0 files changed, 0 insertions, 0 deletions