SIGN IN SIGN UP

gh-129069: Fix listobject.c data races due to memmove (gh-142957)

The use of memmove and _Py_memory_repeat were not thread-safe in the
free threading build in some cases. In theory, memmove and
_Py_memory_repeat can copy byte-by-byte instead of pointer-by-pointer,
so concurrent readers could see uninitialized data or tearing.

Additionally, we should be using "release" (or stronger) ordering to be
compliant with the C11 memory model when copying objects within a list.
S
Sam Gross committed
e46f28c6afce9c85e4bc4a113d1c7efc472e7d8f
Parent: 4ea3c1a
Committed by GitHub <noreply@github.com> on 12/19/2025, 11:06:47 PM