Skip to content

gh-135552: Clear weakrefs to types in GC after garbage finalization not before#135728

Closed
sergey-miryanov wants to merge 12 commits intopython:mainfrom
sergey-miryanov:gh-135552-fix-gc-segfault
Closed

gh-135552: Clear weakrefs to types in GC after garbage finalization not before#135728
sergey-miryanov wants to merge 12 commits intopython:mainfrom
sergey-miryanov:gh-135552-fix-gc-segfault

Conversation

@sergey-miryanov
Copy link
Contributor

@sergey-miryanov sergey-miryanov commented Jun 19, 2025

While trying to find the root cause of the linked issue, I observed that the type cache was holding an obsolete reference. Because the type cache holds borrowed references, this leads to a use-after-free error.

I'm resetting the cache in this PR. But I suspect that this may affect overall performance.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants