8000 [3.9] bpo-44184: Fix subtype_dealloc() for freed type (GH-26274) by miss-islington · Pull Request #27176 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.9] bpo-44184: Fix subtype_dealloc() for freed type (GH-26274) #27176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 15, 2021

Conversation

miss-islington
Copy link
Contributor
@miss-islington miss-islington commented Jul 15, 2021

Fix a crash at Python exit when a deallocator function removes the
last strong reference to a heap type.

Don't read type memory after calling basedealloc() since
basedealloc() can deallocate the type and free its memory.

_PyMem_IsPtrFreed() argument is now constant.
(cherry picked from commit 615069e)

Co-authored-by: Victor Stinner vstinner@python.org

https://bugs.python.org/issue44184

Fix a crash at Python exit when a deallocator function removes the
last strong reference to a heap type.

Don't read type memory after calling basedealloc() since
basedealloc() can deallocate the type and free its memory.

_PyMem_IsPtrFreed() argument is now constant.
(cherry picked from commit 615069e)

Co-authored-by: Victor Stinner <vstinner@python.org>
@miss-islington
Copy link
Contributor Author

@vstinner: Status check is done, and it's a success ✅ .

2 similar comments
@miss-islington
Copy link
Contributor Author

@vstinner: Status check is done, and it's a success ✅ .

@miss-islington
Copy link
Contributor Author

@vstinner: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit 298ee65 into python:3.9 Jul 15, 2021
@miss-islington miss-islington deleted the backport-615069e-3.9 branch July 15, 2021 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0