Skip to content

Conversation

@colesbury
Copy link
Contributor

@colesbury colesbury commented Dec 4, 2025

The GC for the free threading build reuses ob_ref_local when determining if any objects in the unreachable set were resurrected. This is generally okay because the refcount fields are already merged. However, if the tp_traverse calls Py_INCREF/Py_DECREF, it may see an ob_ref_local of UINT32_MAX that looks like an immortal object.

Refactor handle_resurrected_objects so that ob_ref_local doesn't reach UINT32_MAX.

…efs in `tp_traverse`

The GC for the free threading build reuses `ob_ref_local` when
determining if any objects in the unreachable set were resurrected.
This is generally okay because the refcount fields are already merged.
However, if the tp_traverse calls `Py_INCREF`/`Py_DECREF`, it may see an
`ob_ref_local` of `UINT32_MAX` that looks like an immortal object.

Refactor `handle_resurrected_objects` so that `ob_ref_local` doesn't
reach `UINT32_MAX`.
@bedevere-bot

This comment was marked as outdated.

@bedevere-bot bedevere-bot removed the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Dec 4, 2025
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.

2 participants