qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] loadvm not working


From: Piotras
Subject: [Qemu-devel] loadvm not working
Date: Thu, 25 Sep 2008 21:07:24 +0100

Hi,

I discovered a bug that prevents loadvm from working correctly
in current repository version (related to warning "qemu: warning:
instance 0 of device '' not present in current VM").

The implementation of functions qemu_get_be16 and qemu_get_be32
(in file vl.c) relies on implicit conversion of signed byte
(int8_t) values returned by qemu_get_byte to multi-byte integer
types. When value to be converted is negative, the result is
incorrect.

There are two fixes possible:

1) change return type of qemu_get_byte to unsigned (uint8_t)

2) add explicit casts in qemu_get_be16 and qemu_get_be32

For consistency with qemu_get_be16 and qemu_get_be32, first
solution looks better. However I didn't examine all other calls
to qemu_get_byte for possible problems.


Hope this helps,

Piotr




reply via email to

[Prev in Thread] Current Thread [Next in Thread]