diff options
| author | David Hildenbrand <david@redhat.com> | 2018-06-07 17:47:05 +0200 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2018-06-28 19:05:31 +0200 |
| commit | 61362b71c105ccb151ca16897a7d56534423f390 (patch) | |
| tree | cb8a4d1b81b3be360f4c5e802b8a2d3c4523d353 /util/qemu-thread-win32.c | |
| parent | 4d8938a05db15dea2c86c4ab9c5f872f160d2188 (diff) | |
| download | focaccia-qemu-61362b71c105ccb151ca16897a7d56534423f390.tar.gz focaccia-qemu-61362b71c105ccb151ca16897a7d56534423f390.zip | |
exec: check that alignment is a power of two
Right now we can crash QEMU using e.g. qemu-system-x86_64 -m 256M,maxmem=20G,slots=2 \ -object memory-backend-file,id=mem0,size=12288,mem-path=/dev/zero,align=12288 \ -device pc-dimm,id=dimm1,memdev=mem0 qemu-system-x86_64: util/mmap-alloc.c:115: qemu_ram_mmap: Assertion `is_power_of_2(align)' failed Fix this by adding a proper check. Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20180607154705.6316-3-david@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'util/qemu-thread-win32.c')
0 files changed, 0 insertions, 0 deletions