Oren Milman <ore...@gmail.com> added the comment: 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. ---------- title: various refleaks in _elementtree -> various refleaks in _elementtree, and crashes when using an uninitialized XMLParser object type: resource usage -> crash _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31758> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com