]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.6] bpo-31499, xml.etree: Fix xmlparser_gc_clear() crash (GH-3641) (#3645)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 18 Sep 2017 12:48:23 +0000 (05:48 -0700)
committerVictor Stinner <victor.stinner@gmail.com>
Mon, 18 Sep 2017 12:48:23 +0000 (05:48 -0700)
commit8afd7ab12d7f8915b549cf04af384b495ec73d22
treea52757a147edae91845e1cf4d82b75d3eb931069
parent84c89ef4e5086e71e3d9ee65cd3620bf8174c9ac
[3.6] bpo-31499, xml.etree: Fix xmlparser_gc_clear() crash (GH-3641) (#3645)

* bpo-31499, xml.etree: Fix xmlparser_gc_clear() crash

xml.etree: xmlparser_gc_clear() now sets self.parser to NULL to prevent a
crash in xmlparser_dealloc() if xmlparser_gc_clear() was called previously
by the garbage collector, because the parser was part of a reference cycle.

Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit e727d41ffcd91b21ce82026ec8c8381d34a16209)
Lib/test/test_xml_etree_c.py
Misc/NEWS.d/next/Library/2017-09-18-10-57-04.bpo-31499.BydYhf.rst [new file with mode: 0644]
Modules/_elementtree.c