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 <rep...@bugs.python.org>
<https://bugs.python.org/issue31499>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to