]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-46070: _PyGC_Fini() untracks objects (GH-30577)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 13 Jan 2022 18:50:09 +0000 (10:50 -0800)
committerGitHub <noreply@github.com>
Thu, 13 Jan 2022 18:50:09 +0000 (10:50 -0800)
commite6bb17fe29713368e1fd93d9ac9611017c4f570c
tree47bf5c6217a36e98bd2cef4285a6c4521a1a120b
parent3ce6945f5f434806eea700eb5ff1bed6d39395e1
bpo-46070: _PyGC_Fini() untracks objects (GH-30577)

Py_EndInterpreter() now explicitly untracks all objects currently
tracked by the GC. Previously, if an object was used later by another
interpreter, calling PyObject_GC_UnTrack() on the object crashed if
the previous or the next object of the PyGC_Head structure became a
dangling pointer.
(cherry picked from commit 1a4d1c1c9b08e75e88aeac90901920938f649832)

Co-authored-by: Victor Stinner <vstinner@python.org>
Misc/NEWS.d/next/Core and Builtins/2022-01-13-17-58-56.bpo-46070.q8IGth.rst [new file with mode: 0644]
Modules/gcmodule.c