XMLPullParser causes segfault/appcrash
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.
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_
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_
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)
Read the warning here:
http:// lxml.de/ parsing. html#modifying- the-tree