Re: Memory leak in virInitialize -> vboxRegister -> VBoxCGlueInit

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

 



On Mon, Aug 13, 2012 at 09:53:22AM -0600, Eric Blake wrote:
> 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?

Is there a way for individual libraries to register global suppression
files with valgrind ?  If so, then I think it'd be reasonable for us
to supply one. Otherwise, we could at least stuff one in the docs
directory

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[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]