◐ Shell
clean mode source ↗

gh-127879: Fix data race in `_PyFreeList_Push` by colesbury · Pull Request #127880 · python/cpython

Conversation

@colesbury

@colesbury colesbury commented

Dec 12, 2024

edited by bedevere-app Bot

Loading

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.

@colesbury

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

Fidget-Spinner

mpage

srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request

Jan 8, 2025
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.

Labels