-
-
Couldn't load subscription status.
- Fork 33.3k
gh-133467: fix data race in type_set_name #137302
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Thanks @kumaraditya303 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14. |
Fix data race in `type_set_name` by assigning name under stop the world pause making it thread safe in free-threading. (cherry picked from commit e99bc7f) Co-authored-by: Kumar Aditya <[email protected]>
|
GH-137303 is a backport of this pull request to the 3.14 branch. |
Fix data race in `type_set_name` by assigning name under stop the world pause making it thread safe in free-threading.
gh-133467: fix data race in `type_set_name` (GH-137302) Fix data race in `type_set_name` by assigning name under stop the world pause making it thread safe in free-threading. (cherry picked from commit e99bc7f) Co-authored-by: Kumar Aditya <[email protected]>
This fixes two data races:
type_set_name: Assign the new name under stop the world pause to avoid data races with threads concurrently reading and writing name.slot_tp_descr_get: Avoid assignment inslot_tp_descr_getas it is not thread safe in free-threading and is a minor optimization.