Re: [PATCH] Fixed integer wraparound in python binding

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

 



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@xxxxxxxxxx  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]