Read about our upcoming Code of Conduct on this issue

This instance was upgraded to Heptapod 0.28.0 today

Commit 993d8db5 authored by alex@thinkpad's avatar alex@thinkpad
Browse files

QEMU: fixed shift warning in logging.c

(found with UBSan)

--HG--
branch : qemu
parent bfdf904b05cb
......@@ -1720,7 +1720,7 @@ static void eos_romcpy_log_mem(EOSState *s, MemoryRegion *mr, hwaddr _addr, uint
{
if (was_read && addr == last_read_addr + last_read_size)
{
last_read_value |= ((__int128_t)value << (last_read_size * 8));
last_read_value |= ((__uint128_t)value << (last_read_size * 8));
last_read_size += size;
qemu_log_mask(EOS_LOG_VERBOSE, "%d-bit read from %x (accumulated)\n", last_read_size * 8, last_read_addr);
}
......@@ -1739,7 +1739,7 @@ static void eos_romcpy_log_mem(EOSState *s, MemoryRegion *mr, hwaddr _addr, uint
{
if (size < last_read_size && addr == last_write_addr + last_write_size)
{
last_write_value |= ((__int128_t)value << (last_write_size * 8));
last_write_value |= ((__uint128_t)value << (last_write_size * 8));
last_write_size += size;
qemu_log_mask(EOS_LOG_VERBOSE, "%d-bit write to %x (accumulated)\n", last_write_size * 8, last_write_addr);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment