FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-133467: fix data race in type_set_name by kumaraditya303 · Pull Request #137302 · python/cpython · GitHub

/ cpython Public

gh-133467: fix data race in type_set_name - #137302

Merged
kumaraditya303 merged 4 commits into
python:mainfrom
kumaraditya303:type-races
Aug 1, 2025
Merged

gh-133467: fix data race in type_set_name#137302
kumaraditya303 merged 4 commits into
python:mainfrom
kumaraditya303:type-races

Conversation

kumaraditya303 commented Aug 1, 2025
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

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 in slot_tp_descr_get as it is not thread safe in free-threading and is a minor optimization.

kumaraditya303 changed the title 133467: fix data race in type_set_name gh-133467: fix data race in type_set_name Aug 1, 2025

colesbury left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

kumaraditya303 enabled auto-merge (squash) August 1, 2025 13:36
kumaraditya303 merged commit e99bc7f into python:main Aug 1, 2025
44 checks passed

Copy link
Copy Markdown

Thanks @kumaraditya303 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 1, 2025
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 <kumaraditya@python.org>

bedevere-app Bot commented Aug 1, 2025

Copy link
Copy Markdown

GH-137303 is a backport of this pull request to the 3.14 branch.

bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Aug 1, 2025
kumaraditya303 deleted the type-races branch August 1, 2025 13:41
Agent-Hellboy pushed a commit to Agent-Hellboy/cpython that referenced this pull request Aug 19, 2025
Fix data race in `type_set_name` by assigning name under stop the world pause making it thread safe in free-threading.
kumaraditya303 added a commit that referenced this pull request Oct 7, 2025
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 <kumaraditya@python.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL