Re: Entering freeze for libvirt-4.6.0

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

 



On Mon, Jul 30, 2018 at 05:20:01PM +0200, Andrea Bolognani wrote:
> It seems like a similar issue could affect any application linking
> both to libvirt and json-glib, regardless of whether or not the NSS
> plugin has been enabled, which is of course pretty bad.
> 
> Unfortunately, I don't have any bright ideas on how to solve this,
> so anyone who might: please step forward! We're just a few days
> away from the next release, and if we can't figure out a way around
> this soon I'm afraid the only reasonable course of action would be
> to (temporarily) revert the switch from yajl to jansson.

It turns out we're not the first people to hit this problem. NetworkManager
uses jansson in its libnm-core.so library, and that caused crashes[1] when it
was loaded into GNOME control center  which uses json-glib.

They came up with a clever but gross solution [2].

First stop linking to jansson at build time. Then have code that calls
dlopen(jansson.so), passing RTLD_LAZY | RTLD_LOCAL which avoids jansson
symbols polluting the entire application.  Now use dlsym()  to resolve
ach jansson symbol they need to use and store them in function pointer
variables. Their code can now indirect call jansson via these saved
pointers.  This sounds like a doable approach for this release at least,
while we consider whether there's a better option long term.


Regards,
Daniel

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1535905
[2] https://github.com/NetworkManager/NetworkManager/blob/master/libnm-core/nm-json.c
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

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

  Powered by Linux