]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-128759: Fix accesses to `tp_version_tag`. (GH-129750)
authorSam Gross <colesbury@gmail.com>
Wed, 12 Feb 2025 14:34:40 +0000 (09:34 -0500)
committerGitHub <noreply@github.com>
Wed, 12 Feb 2025 14:34:40 +0000 (09:34 -0500)
commit57f45ee2d8ee23c2a1d1daba4095a5a044169419
treefb3e9220bc62c3812220d0ca7b758dce11d463eb
parent3cf68cdd3e1809df4e426c61f6990de63747ec6f
gh-128759: Fix accesses to `tp_version_tag`. (GH-129750)

We should use a relaxed atomic load in the free threading build in
`PyType_Modified()` because that's called without the type lock held.
It's not necessary to use atomics in `type_modified_unlocked()`.

We should also use `FT_ATOMIC_STORE_UINT_RELAXED()` instead of the
`UINT32` variant because `tp_version_tag` is declared as `unsigned int`.
Objects/typeobject.c