Re: [PATCHv2 1/6] threads: check for failure to set thread-local value

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

 



On Thu, Jan 19, 2012 at 11:44:41AM -0700, Eric Blake wrote:
> We had a memory leak on a very arcane OOM situation (unlikely to ever
> hit in practice, but who knows if libvirt.so would ever be linked
> into some other program that exhausts all thread-local storage keys?).
> I found it by code inspection, while analyzing a valgrind report
> generated by Alex Jia.
> 
> * src/util/threads.h (virThreadLocalSet): Alter signature.
> * src/util/threads-pthread.c (virThreadHelper): Reduce allocation
> lifetime.
> (virThreadLocalSet): Detect failure.
> * src/util/threads-win32.c (virThreadLocalSet): Likewise.
> (virCondWait): Fix caller.
> * src/util/virterror.c (virLastErrorObject): Likewise.
> ---
>  src/util/threads-pthread.c |   14 +++++++++++---
>  src/util/threads-win32.c   |    9 ++++++---
>  src/util/threads.h         |    2 +-
>  src/util/virterror.c       |    5 +++--
>  4 files changed, 21 insertions(+), 9 deletions(-)

ACK

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]