Segmentation fault during garbage collection when using custom parser and resolver

Bug #1772660 reported by gcc on 2018-05-22
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxml
Undecided
Unassigned

Bug Description

The attached script causes a segmentation fault during garbage collection, on Python3 ONLY, with this stack trace:

(gdb) bt
#0 __pyx_pf_4lxml_5etree_14_ParserContext_2__dealloc__ (__pyx_v_self=0x7fffed26db10) at src/lxml/etree.c:42031
#1 __pyx_pw_4lxml_5etree_14_ParserContext_3__dealloc__ (__pyx_v_self=0x7fffed26db10) at src/lxml/etree.c:41946
#2 __pyx_tp_dealloc_4lxml_5etree__ParserContext (o=0x7fffed26db10) at src/lxml/etree.c:21936
#3 0x00007ffff7a5d05a in delete_garbage (old=<optimized out>, collectable=<optimized out>) at Modules/gcmodule.c:868
#4 collect (generation=generation@entry=2, n_collected=n_collected@entry=0x0, n_uncollectable=n_uncollectable@entry=0x0, nofail=nofail@entry=1) at Modules/gcmodule.c:1019
#5 0x00007ffff7a5da81 in _PyGC_CollectNoFail () at Modules/gcmodule.c:1623
#6 0x00007ffff7a28a04 in PyImport_Cleanup () at Python/import.c:420
#7 0x00007ffff7a3af9a in Py_FinalizeEx () at Python/pylifecycle.c:612
#8 0x00007ffff7a5b9c9 in Py_Main (argc=argc@entry=2, argv=argv@entry=0x603010) at Modules/main.c:829
#9 0x0000000000400b1c in main (argc=2, argv=<optimized out>) at ./Programs/python.c:69

This does not happen with version 3.7.1, or on Python 2.

Python : sys.version_info(major=3, minor=6, micro=1, releaselevel='final', serial=0)
lxml.etree : (4, 2, 1, 0)
libxml used : (2, 9, 4)
libxml compiled : (2, 9, 4)
libxslt used : (1, 1, 29)
libxslt compiled : (1, 1, 29)

gcc (chris+ubuntu-qwirx) wrote :
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers