qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] loadvm not working


From: Anthony Liguori
Subject: Re: [Qemu-devel] loadvm not working
Date: Thu, 25 Sep 2008 15:20:59 -0500
User-agent: Thunderbird 2.0.0.16 (X11/20080723)

Piotras wrote:
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.

Heh, I literally just debugged this myself :-) That patch that introduced this is being reverted so it'll be fixed in a few hours.

Regards,

Anthony Liguori

Hope this helps,

Piotr







reply via email to

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