mirror of https://gitee.com/openkylin/libvirt.git
8e44e5593e
When libvirt calls virInitialize it creates a thread local for the virErrorPtr storage, and registers a callback to cleanup memory when a thread exits. When libvirt is dlclose()d or otherwise made non-resident, the callback function is removed from memory, but the thread local may still exist and if a thread later exists, it will invoke the callback and SEGV. There may also be other thread locals with callbacks pointing to libvirt code, so it is in general never safe to unload libvirt.so from memory once initialized. To allow dlclose() to succeed, but keep libvirt.so resident in memory, link with '-z nodelete'. This issue was first found with the libvirt CIM provider, but can potentially hit many of the dynamic language bindings which all ultimately involve dlopen() in some way, either on libvirt.so itself, or on the glue code for the binding which in turns links to libvirt * configure.ac, src/Makefile.am: Ensure libvirt.so is linked with -z nodelete * cfg.mk, .gitignore, tests/Makefile.am, tests/shunloadhelper.c, tests/shunloadtest.c: A test case to unload libvirt while a thread is still running. |
||
---|---|---|
.gnulib@da1717b7f9 | ||
daemon | ||
docs | ||
examples | ||
gnulib | ||
include | ||
m4 | ||
po | ||
python | ||
src | ||
tests | ||
tools | ||
.dir-locals.el | ||
.gitignore | ||
.gitmodules | ||
.mailmap | ||
AUTHORS | ||
COPYING.LIB | ||
ChangeLog-old | ||
HACKING | ||
Makefile.am | ||
Makefile.nonreentrant | ||
README | ||
README-hacking | ||
TODO | ||
autobuild.sh | ||
autogen.sh | ||
bootstrap | ||
bootstrap.conf | ||
cfg.mk | ||
configure.ac | ||
libvirt.pc.in | ||
libvirt.spec.in | ||
mingw32-libvirt.spec.in |
README
LibVirt : simple API for virtualization Libvirt is a C toolkit to interact with the virtualization capabilities of recent versions of Linux (and other OSes). It is free software available under the GNU Lesser General Public License. Virtualization of the Linux Operating System means the ability to run multiple instances of Operating Systems concurrently on a single hardware system where the basic resources are driven by a Linux instance. The library aim at providing long term stable C API initially for the Xen paravirtualization but should be able to integrate other virtualization mechanisms if needed. Daniel Veillard <veillard@redhat.com>