]> git.proxmox.com Git - qemu.git/commit
exec: assert that RAMBlock size is non-zero
authorStefan Hajnoczi <stefanha@redhat.com>
Mon, 11 Mar 2013 09:20:21 +0000 (10:20 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 26 Mar 2013 19:02:17 +0000 (21:02 +0200)
commit49cd9ac6a1929467e2df5783a5183fc7708ec3ff
treebf504638c2c65b71604f5c7b87ce090acd608c44
parent8c7f3dd05e4f1ee90000c89e428e69ae2e6bd691
exec: assert that RAMBlock size is non-zero

find_ram_offset() does not handle size=0 gracefully.  It hands out the
same RAMBlock offset multiple times, leading to obscure failures later
on.

Add an assert to warn early if something is incorrectly allocating a
zero size RAMBlock.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
exec.c