]> granicus.if.org Git - python/commit
bpo-31499, xml.etree: Fix xmlparser_gc_clear() crash (#3641)
authorVictor Stinner <victor.stinner@gmail.com>
Mon, 18 Sep 2017 12:29:37 +0000 (05:29 -0700)
committerGitHub <noreply@github.com>
Mon, 18 Sep 2017 12:29:37 +0000 (05:29 -0700)
commite727d41ffcd91b21ce82026ec8c8381d34a16209
tree6fe96261c5baf6fe58a218c6c1d3649d931c8606
parent9b47af65375fab9318e88ccb061394a36c8c6c33
bpo-31499, xml.etree: Fix xmlparser_gc_clear() crash (#3641)

* 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>
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