crash when mixing with C lib that calls libxml2
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxml |
Triaged
|
Undecided
|
Unassigned |
Bug Description
Reproducer:
$ cat test.py
import os
import libvirt
import lxml.etree
libvirt.
$ wget https:/
$ python test.py
Segmentation fault (core dumped)
Backtrace is:
Program received signal SIGSEGV, Segmentation fault.
__pyx_f_
40478 __pyx_t_3 = __Pyx_PyObject_
gdb$ bt
#0 __pyx_f_
#1 0x00007fffee17d88d in xmlLoadExternal
#2 0x00007fffee16a767 in xmlCtxtReadFile () from /lib64/libxml2.so.2
#3 0x00007fffef6d1494 in virXMLParseHelper () from /lib64/libvirt.so.0
#4 0x00007fffef7b6281 in testConnectOpen () from /lib64/libvirt.so.0
#5 0x00007fffef76eb3f in virConnectOpenI
#6 0x00007fffef76fd70 in virConnectOpen () from /lib64/libvirt.so.0
#7 0x00007fffefc46470 in libvirt_
#8 0x00007ffff7afe62e in PyEval_EvalFrameEx () from /lib64/
#9 0x00007ffff7aff288 in PyEval_EvalCodeEx () from /lib64/
#10 0x00007ffff7afc283 in PyEval_EvalFrameEx () from /lib64/
#11 0x00007ffff7aff288 in PyEval_EvalCodeEx () from /lib64/
#12 0x00007ffff7aff499 in PyEval_EvalCode () from /lib64/
#13 0x00007ffff7b0578f in run_mod () from /lib64/
#14 0x00007ffff7b0573a in PyRun_FileExFlags () from /lib64/
#15 0x00007ffff7b0562e in PyRun_SimpleFil
#16 0x00007ffff7b0b8ce in Py_Main () from /lib64/
#17 0x00007ffff6c5900a in __libc_start_main () from /lib64/libc.so.6
#18 0x000055555555478a in _start ()
I'm on Fedora 27:
$ rpm -q python2-lxml python2-libvirt python2-libxml2
python2-
python2-
python2-
Python : sys.version_
lxml.etree : (4, 1, 1, 0)
libxml used : (2, 9, 7)
libxml compiled : (2, 9, 5)
libxslt used : (1, 1, 29)
libxslt compiled : (1, 1, 29)
Crashes with python3 as well
I reproduced with lxml 4.0.0 and 3.7.2 packages from fedora, but I didn't reproduce with pip installed lxml, so maybe this is distribution build specific