]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-120524: Avoid a Race On _PyRuntime.types.managed_static.types[i].interp_cou...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 17 Jun 2024 22:13:40 +0000 (00:13 +0200)
committerGitHub <noreply@github.com>
Mon, 17 Jun 2024 22:13:40 +0000 (16:13 -0600)
commit71ad34d2190a1f16ac7dbc70b8bce8c6b2549109
tree2cf5b04b86885324725bb7b2efa89f64d890c4be
parent396f8b0b98441344e1d3223a4075e5e342e0c2df
[3.13] gh-120524: Avoid a Race On _PyRuntime.types.managed_static.types[i].interp_count (gh-120657)

gh-120182 added new global state (interp_count), but didn't add thread-safety for it.  This change eliminates the possible race.

(cherry picked from commit 2c66318cdc0545da37e7046533dfe74bde129d91, AKA gh-120529)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
Lib/test/test_interpreters/test_stress.py
Objects/typeobject.c