Skip to content

Conversation

vstinner
Copy link
Contributor

This function is also broken on free-threading because free-threading stores and reads dictionary pointer atomically, it is not safe to read the dictionary pointer directly as returned by this function.

Use PyObject_ClearManagedDict() instead in clear_instance().

Description

Suggested changelog entry:

  • Placeholder.

This function is also broken on free-threading because free-threading
stores and reads dictionary pointer atomically, it is not safe to
read the dictionary pointer directly as returned by this function.

Use PyObject_ClearManagedDict() instead in clear_instance().
@vstinner
Copy link
Contributor Author

I marked my PR as a draft since I'm not sure that it's correct. And CIs do crash with segfault :-(

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.

1 participant