Title: `memcpy` data race in `setobject.c` · Issue #143100 · python/cpython · GitHub
Open Graph Title: `memcpy` data race in `setobject.c` · Issue #143100 · python/cpython
X Title: `memcpy` data race in `setobject.c` · Issue #143100 · python/cpython
Description: Bug report Seen when running locally. We should use the ptr_wise_atomic_memmove from listobject.c. WARNING: ThreadSanitizer: data race (pid=833878) Write of size 8 at 0x7fffb57ba460 by thread T10318: #0 __tsan_memcpy
Open Graph Description: Bug report Seen when running locally. We should use the ptr_wise_atomic_memmove from listobject.c. WARNING: ThreadSanitizer: data race (pid=833878) Write of size 8 at 0x7fffb57ba460 by thread T1031...
X Description: Bug report Seen when running locally. We should use the ptr_wise_atomic_memmove from listobject.c. WARNING: ThreadSanitizer: data race (pid=833878) Write of size 8 at 0x7fffb57ba460 by thread T1031...
Opengraph URL: https://github.com/python/cpython/issues/143100
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`memcpy` data race in `setobject.c`","articleBody":"# Bug report\n\nSeen when running locally. We should use the `ptr_wise_atomic_memmove` from `listobject.c`.\n\n```\nWARNING: ThreadSanitizer: data race (pid=833878)\n Write of size 8 at 0x7fffb57ba460 by thread T10318:\n #0 __tsan_memcpy \u003cnull\u003e (python+0xf4b62) (BuildId: 62048a720cd5edc7e743b66781182a91a8a5cb4a)\n #1 set_swap_bodies /home/sgross/cpython/Objects/setobject.c:1465:9 (python+0x396739) (BuildId: 62048a720cd5edc7e743b66781182a91a8a5cb4a)\n #2 set_intersection_update /home/sgross/cpython/Objects/setobject.c:1740:5 (python+0x391a91) (BuildId: 62048a720cd5edc7e743b66781182a91a8a5cb4a)\n #3 set_iand /home/sgross/cpython/Objects/setobject.c:1795:14 (python+0x391a91)\n...\n\n Previous atomic read of size 8 at 0x7fffb57ba460 by thread T10317:\n #0 _Py_atomic_load_ptr_acquire /home/sgross/cpython/./Include/cpython/pyatomic_gcc.h:557:18 (python+0x38bb7c) (BuildId: 62048a720cd5edc7e743b66781182a91a8a5cb4a)\n #1 set_compare_threadsafe /home/sgross/cpython/Objects/setobject.c:100:26 (python+0x38bb7c)\n #2 set_do_lookup /home/sgross/cpython/Objects/setobject.c:234:22 (python+0x38bb7c)\n #3 set_lookkey_threadsafe /home/sgross/cpython/Objects/setobject.c:452:14 (python+0x38bb7c)\n #4 set_contains_entry /home/sgross/cpython/Objects/setobject.c:566:12 (python+0x38bb7c)\n```\n\nhttps://github.com/python/cpython/blob/6536fab19410ce701575b553d381cf805d3ef323/Objects/setobject.c#L1463-L1467\n\nhttps://github.com/python/cpython/blob/6536fab19410ce701575b553d381cf805d3ef323/Objects/setobject.c#L96-L100\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-143114\n* gh-143127\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/colesbury","@type":"Person","name":"colesbury"},"datePublished":"2025-12-23T15:48:41.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/143100/cpython/issues/143100"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0b95e177-1755-67e9-ed32-f7e15febcf2b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9070:3C2857:3F7B99:59F277:6A57A735 |
| html-safe-nonce | ede160406da4304b8f78b9d910f244dc5d175fec251f0758da311c25c246f635 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MDcwOjNDMjg1NzozRjdCOTk6NTlGMjc3OjZBNTdBNzM1IiwidmlzaXRvcl9pZCI6IjQyNDg2MzE1NzU2ODcxNzgwMzciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 61aa1caa5447c4a2028261fa7dd760b5d29122b9649e31f840400c4d08581205 |
| hovercard-subject-tag | issue:3757782165 |
| 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/_view_fragments/issues/show/python/cpython/143100/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d4a0163c40c10d55c047dd171f5266b3ad2db78c3ca1837fd735058cd01029ac/python/cpython/issues/143100 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d4a0163c40c10d55c047dd171f5266b3ad2db78c3ca1837fd735058cd01029ac/python/cpython/issues/143100 |
| og:image:alt | Bug report Seen when running locally. We should use the ptr_wise_atomic_memmove from listobject.c. WARNING: ThreadSanitizer: data race (pid=833878) Write of size 8 at 0x7fffb57ba460 by thread T1031... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | colesbury |
| hostname | github.com |
| expected-hostname | github.com |
| None | 017a07c29bdd8a37b5907fc9a689338deb7103b5af7f56714193b2700229b3df |
| turbo-cache-control | no-preview |
| 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 | 4cd16a676f89d1cedb932671a5c2d20b8e60f86a |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width