]> granicus.if.org Git - python/commit
bpo-38392: PyObject_GC_Track() validates object in debug mode (GH-16615)
authorVictor Stinner <vstinner@python.org>
Mon, 7 Oct 2019 22:09:31 +0000 (00:09 +0200)
committerGitHub <noreply@github.com>
Mon, 7 Oct 2019 22:09:31 +0000 (00:09 +0200)
commit1b1845569539db5c1a6948a5d32daea381f1e35f
tree9e9b867120a68e7f1f2c1f270dd102a6297adca6
parent7775349895088a7ae68cecf0c74cf817f15e2c74
bpo-38392: PyObject_GC_Track() validates object in debug mode (GH-16615)

In debug mode, PyObject_GC_Track() now calls tp_traverse() of the
object type to ensure that the object is valid: test that objects
visited by tp_traverse() are valid.

Fix pyexpat.c: only track the parser in the GC once the parser is
fully initialized.
Misc/NEWS.d/next/Core and Builtins/2019-10-07-22-51-39.bpo-38392.KaXXps.rst [new file with mode: 0644]
Modules/_elementtree.c
Modules/gcmodule.c
Modules/pyexpat.c