8000 gh-135552: Clear weakrefs to types in GC after garbage finalization not before by sergey-miryanov · Pull Request #135728 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

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

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update Misc/NEWS.d/next/Core_and_Builtins/2025-06-23-01-07-09.gh-issu…
…e-135552.eG9vzP.rst

Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
  • Loading branch information
sergey-miryanov and efimov-mikhail authored Jun 23, 2025
commit de8841c95cfe80c172bd93fc362f30c56f17477b
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Split the handling of weak references in the GC if both types and instances
within a generation are unreachable. This prevent the clearing of the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
within a generation are unreachable. This prevent the clearing of the
within a generation are unreachable. This prevent the clearing of the

type's subclasses list too early. This fix a segfault that occurs when
type's subclasses list too early. This fix a crash that occurs when
:meth:`~object.__del__` modifies the base's attributes and tries to access them from self.
Loading
0