Skip to content

Conversation

@miss-islington
Copy link
Contributor

@miss-islingtonmiss-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 [email protected]

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 <[email protected]>
@miss-islington
Copy link
ContributorAuthor

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

2 similar comments
@miss-islington
Copy link
ContributorAuthor

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

@miss-islington
Copy link
ContributorAuthor

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

@miss-islingtonmiss-islington merged commit 298ee65 into python:3.9Jul 15, 2021
@miss-islingtonmiss-islington deleted the backport-615069e-3.9 branch July 15, 2021 23:36
Sign up for freeto 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

@miss-islington@Yhg1s@the-knights-who-say-ni@bedevere-bot@vstinner