[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [Libvir] [PATCH] Fixed integer wraparound in python binding
- From: Daniel Veillard <veillard redhat com>
- To: "Daniel P. Berrange" <berrange redhat com>
- Cc: libvir-list redhat com
- Subject: Re: [Libvir] [PATCH] Fixed integer wraparound in python binding
- Date: Wed, 15 Nov 2006 05:47:37 -0500
On Wed, Nov 15, 2006 at 02:41:55AM +0000, Daniel P. Berrange wrote:
> The attached patch fixes a problem with integrate wraparound in the python
> bindings. THe problem is thus:
>
> - the memory & max-memory fields in the virDomainInfo struct are
> of type 'unsigned long'.
> - The python bindings, however, then stick this into a python 'Int'
> which is signed.
>
> Now, on 64-bit this is not an issue. For DomU guests on 32-bit it is not
> an issue either, but for Dom0 XenD sets the max-memory field to be
> 2^32-1 whcih causes wraparound when converting to python int.
>
> This patch simply switches the python binding over to using a python Long
> which is 64 bits on all platforms.
Dohh, sure, please push !
Daniel
--
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard | virtualization library http://libvirt.org/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]