]> granicus.if.org Git - python/commit
bpo-38070: Enhance visit_decref() debug trace (GH-16631)
authorVictor Stinner <vstinner@python.org>
Tue, 8 Oct 2019 00:37:38 +0000 (02:37 +0200)
committerGitHub <noreply@github.com>
Tue, 8 Oct 2019 00:37:38 +0000 (02:37 +0200)
commit4d5f94b8cd20f804c7868c5395a15aa6032f874c
treeac7b34d63409a67659c9986b80e25970aea9a2fd
parent36e33c360ed7716a2b5ab2b53210da81f8ce1295
bpo-38070: Enhance visit_decref() debug trace (GH-16631)

subtract_refs() now pass the parent object to visit_decref() which
pass it to _PyObject_ASSERT(). So if the "is freed" assertion fails,
the parent is used in debug trace, rather than the freed object. The
parent object is more likely to contain useful information. Freed
objects cannot be inspected are are displayed as "<object at xxx is
freed>" with no other detail.
Modules/gcmodule.c