Author Oren Milman
Recipients Oren Milman, eli.bendersky, scoder, serhiy.storchaka
Date 2017-10-14.16:39:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1507999176.11.0.213398074469.issue31758@psf.upfronthosting.co.za>
In-reply-to
Content
According to Serhiy's advice (https://bugs.python.org/issue31455#msg304338),
this issue now also includes some crashes in _elementtree:


The following code crashes:
import _elementtree
parser = _elementtree.XMLParser.__new__(_elementtree.XMLParser)
parser.close()

This is because _elementtree_XMLParser_close_impl() assumes that the XMLParser
object is initialized, and so it passes `self` to expat_parse(), which assumes
that `self->parser` is valid, and crashes.
Similarly, calling feed(), _parse_whole() or _setevents(), or reading the
`entity` or `target` attribute of an uninitialized XMLParser object would
result in a crash.


ISTM that PR 3956 is more complex, and already not so small, so i would soon
open another PR to fix these crashes.
History
Date User Action Args
2017-10-14 16:39:36Oren Milmansetrecipients: + Oren Milman, scoder, eli.bendersky, serhiy.storchaka
2017-10-14 16:39:36Oren Milmansetmessageid: <1507999176.11.0.213398074469.issue31758@psf.upfronthosting.co.za>
2017-10-14 16:39:36Oren Milmanlinkissue31758 messages
2017-10-14 16:39:35Oren Milmancreate