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

Re: [Libguestfs] [PATCH 1/2] lib: enable the libvirt code consistently everywhere



On Mon, Nov 09, 2015 at 11:41:30AM +0100, Pino Toscano wrote:
> With commit bc2b41778405cc6a376a670703ce63e3678bf1fb
> HAVE_LIBVIRT_BACKEND is defined based on the libvirt version (using its
> version macro), although libvirt.h is included only after that check:
> because of this, variables in the guestfs_h struct after the
> HAVE_LIBVIRT_BACKEND block would be used wrongly if libvirt.h was not
> included before guestfs-internal.h, like in the recently added
> available.c (all the other places using libvirt features in the handle
> already happened to do so).

!!!

Yes, I knew it would turn out to be memory corruption.  ACK series.

/me wonders how to avoid such problems in general ...

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top


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