etree.iterparse produces segfault when html=True and listening for 'start' events

Bug #903782 reported by Johannes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxml
Fix Released
Critical
scoder

Bug Description

lxml.etree: (2, 3, 0, 0)
libxml used: (2, 7, 8)
libxml compiled: (2, 7, 8)
libxslt used: (1, 1, 26)
libxslt compiled: (1, 1, 26)

Platforms: Linux (Windows is fine)

Code that reproduces issue attached.

The gist of it:

from StringIO import StringIO
from lxml import etree

fileh = StringIO("<html><body><p>Test</p></body></html>")

context = etree.iterparse(fileh, events=['start', 'end'], html=True)
event, el = context.next()

Revision history for this message
Johannes (johtso) wrote :
Johannes (johtso)
summary: - etree.iterparse segfault when html=True and listening for 'start' events
+ etree.iterparse produces segfault when html=True and listening for
+ 'start' events
description: updated
Revision history for this message
scoder (scoder) wrote :

Thanks for the report and the test code. Made it easy to reproduce the crash. I'll look into it.

Changed in lxml:
assignee: nobody → Stefan Behnel (scoder)
importance: Undecided → Critical
status: New → Confirmed
Revision history for this message
scoder (scoder) wrote :
Changed in lxml:
status: Confirmed → Fix Committed
Revision history for this message
scoder (scoder) wrote :

Fixed in lxml 2.3.3.

Changed in lxml:
status: Fix Committed → Fix Released
scoder (scoder)
Changed in lxml:
milestone: none → 2.3.x
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.