[New-bugs-announce] [issue31499] ElementTree crash with new expat
Stefan Behnel
report at bugs.python.org
Sun Sep 17 13:27:08 EDT 2017
New submission from Stefan Behnel:
I'm seeing crashes in the latest Py3.7 when I run this test (taken from lxml's compatibility test suite):
etree = xml.etree.ElementTree
def test_feed_parser_error_position(self):
ParseError = etree.ParseError
parser = XMLParser()
try:
parser.close()
except ParseError:
e = sys.exc_info()[1]
self.assertNotEqual(None, e.code)
self.assertNotEqual(0, e.code)
self.assertTrue(isinstance(e.position, tuple))
self.assertTrue(e.position >= (0, 0))
It crashes in expat/xmlparse.c, line 1464:
1459 for (;;) {
1460 BINDING *b = bindings;
1461 if (!b)
1462 break;
1463 bindings = b->nextTagBinding;
1464 FREE(b->uri); // <<<<<<<<<<<<<<< crashes here
1465 FREE(b);
1466 }
1467 }
Probably related to the new expat version (issue 31170).
----------
components: Extension Modules
messages: 302375
nosy: eli.bendersky, haypo, scoder, serhiy.storchaka
priority: normal
severity: normal
status: open
title: ElementTree crash with new expat
type: crash
versions: Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31499>
_______________________________________
More information about the New-bugs-announce
mailing list