This looks like a bug. When the size is `UINT64_MAX`, it is reset to (Int128)`1 << 64` which actually is `UINT64_MAX + 1`.
Then, an assert is triggered when the size is converted back to uin64_t by using the int128_get64() function, as the new value happens to be different than the previous one. Signed-off-by: Antonio Caggiano <[email protected]> --- system/memory.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/system/memory.c b/system/memory.c index a800fbc9e5..d41fc6af88 100644 --- a/system/memory.c +++ b/system/memory.c @@ -1193,9 +1193,6 @@ static void memory_region_do_init(MemoryRegion *mr, uint64_t size) { mr->size = int128_make64(size); - if (size == UINT64_MAX) { - mr->size = int128_2_64(); - } mr->name = g_strdup(name); mr->owner = owner; mr->dev = (DeviceState *) object_dynamic_cast(mr->owner, TYPE_DEVICE); -- 2.42.0
