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 <null> (python+0xf4b62) (BuildId: 62048a720cd5edc7e743b66781182a91a8a5cb4a)
#1 set_swap_bodies /home/sgross/cpython/Objects/setobject.c:1465:9 (python+0x396739) (BuildId: 62048a720cd5edc7e743b66781182a91a8a5cb4a)
#2 set_intersection_update /home/sgross/cpython/Objects/setobject.c:1740:5 (python+0x391a91) (BuildId: 62048a720cd5edc7e743b66781182a91a8a5cb4a)
#3 set_iand /home/sgross/cpython/Objects/setobject.c:1795:14 (python+0x391a91)
...
Previous atomic read of size 8 at 0x7fffb57ba460 by thread T10317:
#0 _Py_atomic_load_ptr_acquire /home/sgross/cpython/./Include/cpython/pyatomic_gcc.h:557:18 (python+0x38bb7c) (BuildId: 62048a720cd5edc7e743b66781182a91a8a5cb4a)
#1 set_compare_threadsafe /home/sgross/cpython/Objects/setobject.c:100:26 (python+0x38bb7c)
#2 set_do_lookup /home/sgross/cpython/Objects/setobject.c:234:22 (python+0x38bb7c)
#3 set_lookkey_threadsafe /home/sgross/cpython/Objects/setobject.c:452:14 (python+0x38bb7c)
#4 set_contains_entry /home/sgross/cpython/Objects/setobject.c:566:12 (python+0x38bb7c)
Bug report
Seen when running locally. We should use the
ptr_wise_atomic_memmovefromlistobject.c.cpython/Objects/setobject.c
Lines 1463 to 1467 in 6536fab
cpython/Objects/setobject.c
Lines 96 to 100 in 6536fab
Linked PRs