Skip to content

Conversation

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Oct 24, 2024

This fixes a crash when gc.get_objects() or gc.get_referrers() is
called during a GC in the free threading build.

Switch to _PyObjectStack to avoid corrupting the struct worklist
linked list maintained by the GC. Also, don't return objects that are frozen
(gc.freeze()) or in the process of being collected to more closely match
the behavior of the default build.
(cherry picked from commit e545ead)

Co-authored-by: Sam Gross [email protected]

…ythonGH-125882)

This fixes a crash when `gc.get_objects()` or `gc.get_referrers()` is
called during a GC in the free threading build.

Switch to `_PyObjectStack` to avoid corrupting the `struct worklist`
linked list maintained by the GC. Also, don't return objects that are frozen
(`gc.freeze()`) or in the process of being collected to more closely match
the behavior of the default build.
(cherry picked from commit e545ead)

Co-authored-by: Sam Gross <[email protected]>
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.

2 participants