XMLPullParser causes segfault/appcrash

Bug #1454675 reported by Móréh Tamás
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxml
Opinion
Undecided
Unassigned

Bug Description

I use (lxml) XMLPullParser since I have to process large XML files they whole can not be kept in the memory.

When I read the stream/file by chunks (or lines) and feed the parser AND I remove some finished nodes (after 'end' event) Segmentation Fault will be caused at the next feeding. Not Python Exception.
When I read the whole stream/file in one step and feed the parser then I can remove finished elements without any problem.
When I use the built-in xml.etree.ElementTree.XMLPullParser I can read by chunks and can remove any element (after it is finished) without any problem. (In this case I use stack instead of getparent().)

Cases are presented by the attached example.

The main problem is that I don't receive exception but
(in Linux:) Segmentation Fault with return code: 139
(in Windows:) APPCRASH with code: c0000374.

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

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

Revision history for this message
Móréh Tamás (morehtamas-l) wrote :
Revision history for this message
scoder (scoder) wrote :
Changed in lxml:
status: New → Invalid
Revision history for this message
Móréh Tamás (morehtamas-l) wrote :

It is a bug indeed. It is not allowed to occur segmentation fault in a script program instead of raising Exception.
Neither if it's described.

Changed in lxml:
status: Invalid → Opinion
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.