gh-144986: Fix memory leak in atexit.register()#144987
Merged
pablogsal merged 8 commits intopython:mainfrom Feb 19, 2026
Merged
gh-144986: Fix memory leak in atexit.register()#144987pablogsal merged 8 commits intopython:mainfrom
pablogsal merged 8 commits intopython:mainfrom
Conversation
9e66555 to
0e0abc3
Compare
Misc/NEWS.d/next/Library/2026-02-19-00-00-00.gh-issue-144986.atexit-leak.rst
Outdated
Show resolved
Hide resolved
…texit-leak.rst Co-authored-by: Stan Ulbrych <[email protected]>
pablogsal
approved these changes
Feb 19, 2026
Member
|
Thanks for the fix @ashm-dev ! |
Member
|
Does this affect 3.13? |
|
Thanks @ashm-dev for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Feb 19, 2026
(cherry picked from commit 50c1471) Co-authored-by: Shamil <[email protected]>
|
GH-145020 is a backport of this pull request to the 3.14 branch. |
Contributor
@pablogsal No, it is not. Method was rewritten in 3.14 (3b76682). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PyTuple_GetSlice()inatexit_register()returns a new reference that was never decref'd, leaking a tuple on everyatexit.register()call.Also added a missing NULL check after
PyTuple_GetSlice().atexit.register(): missingPy_DECREFforfunc_argstuple #144986