gh-127879: Fix data race in `_PyFreeList_Push` by colesbury · Pull Request #127880 · python/cpython
Conversation
Writes to the ob_tid field need to use atomics because it may be concurrently read by a non-locking dictionary, list, or structmember read.
Writes to the `ob_tid` field need to use atomics because it may be concurrently read by a non-locking dictionary, list, or structmember read.
I tested this locally on top of #126865 and no longer see a TSan failure when running:
TSAN_OPTIONS="suppressions=$(pwd)/Tools/tsan/suppressions_free_threading.txt" ./python -m test test_free_threading -m test_slots -v
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request
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