diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-05-04 10:25:33 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-04 10:25:33 (GMT) |
commit | f84c51eb7a2c17eaabd77cdf95b5f01b46517206 (patch) | |
tree | 4c19da7044751021660eef5a2ccf8f8de203cd7d /Misc | |
parent | 524d2750e33b4d9c98a562943863abe7fd1236cd (diff) | |
download | cpython-f84c51eb7a2c17eaabd77cdf95b5f01b46517206.zip cpython-f84c51eb7a2c17eaabd77cdf95b5f01b46517206.tar.gz cpython-f84c51eb7a2c17eaabd77cdf95b5f01b46517206.tar.bz2 |
gh-92036: Fix gc_fini_untrack() (GH-92037)
Fix a crash in subinterpreters related to the garbage collector. When
a subinterpreter is deleted, untrack all objects tracked by its GC.
To prevent a crash in deallocator functions expecting objects to be
tracked by the GC, leak a strong reference to these objects on
purpose, so they are never deleted and their deallocator functions
are not called.
(cherry picked from commit 14243369b5f80613628a565c224bba7fb3fcacd8)
Co-authored-by: Victor Stinner <vstinner@python.org>
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Core and Builtins/2022-04-28-23-37-30.gh-issue-92036.GZJAC9.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2022-04-28-23-37-30.gh-issue-92036.GZJAC9.rst b/Misc/NEWS.d/next/Core and Builtins/2022-04-28-23-37-30.gh-issue-92036.GZJAC9.rst new file mode 100644 index 0000000..78094c5 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2022-04-28-23-37-30.gh-issue-92036.GZJAC9.rst @@ -0,0 +1,5 @@ +Fix a crash in subinterpreters related to the garbage collector. When a +subinterpreter is deleted, untrack all objects tracked by its GC. To prevent a +crash in deallocator functions expecting objects to be tracked by the GC, leak +a strong reference to these objects on purpose, so they are never deleted and +their deallocator functions are not called. Patch by Victor Stinner. |