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

Re: [libvirt] Memory leak in virInitialize -> vboxRegister -> VBoxCGlueInit



On 08/13/2012 01:57 AM, Daniel P. Berrange wrote:
> On Sat, Aug 11, 2012 at 07:45:19AM +0100, Richard W.M. Jones wrote:
>> https://bugzilla.redhat.com/show_bug.cgi?id=847429
>>
>> Spotted by valgrind:
>>
>> ==2390== 45 bytes in 1 blocks are definitely lost in loss record 68 of 123

>> ==2390==    by 0x5817568: virInitialize (libvirt.c:450)
>> ==2390==    by 0x5492C02: init_libguestfs (guestfs.c:108)
>>
>> libvirt-0.10.0-0rc0.fc18.x86_64
>>
>> libguestfs calls virInitialize, but (since there is no cleanup
>> function) doesn't do any corresponding cleanup.  Is that correct?
> 
> Yep, virInitialize does global one-time initialization and we don't
> provide any de-initialization function, so any memory allocations
> should be considered global state. You'll want to provide a valgrind
> suppressions file which whitelists any stack trace below the
> virInitialize function.

Should libvirt be providing a suppression file as part of the
installation to make it easier for others to ignore known one-shot
initializations?

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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