[issue31499] ElementTree crash while cleaning up ParseError
STINNER Victor
report at bugs.python.org
Mon Sep 18 03:32:39 EDT 2017
STINNER Victor added the comment:
Python 2.7 is not affected because it doesn't implement tp_clear (it doesn't have xmlparser_gc_clear()), only xmlparser_dealloc() calls EXPAT(ParserFree)(self->parser).
I'm unable to reproduce the bug in Python 3.5 nor 3.6.
bug2.py creates a reference cycle the "except etree.ParseError as exc: e = exc # must keep local reference!" which requires to trigger a garbage collection to clear the "parser" variable.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31499>
_______________________________________
More information about the Python-bugs-list
mailing list