Title: Issue · GitHub
Open Graph Title: Issue · python/cpython
X Title: Issue · python/cpython
Description: The Python programming language. Contribute to python/cpython development by creating an account on GitHub.
Open Graph Description: The Python programming language. Contribute to python/cpython development by creating an account on GitHub.
X Description: The Python programming language. Contribute to python/cpython development by creating an account on GitHub.
Opengraph URL: https://github.com/python/cpython
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Type slots are not thread-safe in free-threaded builds","articleBody":"# Bug report\n\n### Bug description:\n\nModification of type slots is protected by the global type lock, however, type slots are read non-atomically without holding the type lock. For example, in `PyObject_SetItem`:\n\nhttps://github.com/python/cpython/blob/5bb059fe606983814a445e4dcf9e96fd7cb4951a/Objects/abstract.c#L231-L235\n\nIt's not clear how we want to address this. From @colesbury in https://github.com/python/cpython/pull/127169#discussion_r1857029790:\n\n```\nI'd lean towards doing a stop-the-world pause when modifying the slot so that we don't need \nto change every read. I expect that to be a bit tricky since class definitions look like they're mutating \nthe class.\n```\n\n\n### CPython versions tested on:\n\n3.13, 3.14, CPython main branch\n\n### Operating systems tested on:\n\nLinux\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-131174\n* gh-133177\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/mpage","@type":"Person","name":"mpage"},"datePublished":"2024-11-25T21:07:34.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/127266/cpython/issues/127266"}
| route-pattern | /:user_id/:repository/issues/:id(.:format) |
| route-controller | issues |
| route-action | show |
| fetch-nonce | v2:751d83b3-516a-6d28-38ed-c1b6b0745fc2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E34E:43A60:91E8D8:C62E3D:6A555108 |
| html-safe-nonce | c3e2c11f8f31334348127bbcb4b137e0004dda93d7ef53e0367d1d5704f83f23 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMzRFOjQzQTYwOjkxRThEODpDNjJFM0Q6NkE1NTUxMDgiLCJ2aXNpdG9yX2lkIjoiOTA5OTMwMTEyMzYzMDkxMTc1MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8a623564825de677ac8a1617fa0a7c6e6b1e24959d76b61d70866a036c1baf82 |
| hovercard-subject-tag | repository:81598961 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/issues/127266 |
| twitter:image | https://opengraph.githubassets.com/0c60dd61c18cd8a20c08de788e97f55d22aafdf8e1e54a865acebe522a5261cd/python/cpython |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0c60dd61c18cd8a20c08de788e97f55d22aafdf8e1e54a865acebe522a5261cd/python/cpython |
| og:image:alt | The Python programming language. Contribute to python/cpython development by creating an account on GitHub. |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | cd9eea424140838b22e9eabd53d92b5702617ddd6d76efcd3a37f08d44309ca5 |
| turbo-cache-control | no-cache |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3084b9f587e8f1e19803bbe0c77ac77ce3c99c5c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width