]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-129668: Fix thread-safety of MemoryError freelist in free threaded build...
authorSam Gross <colesbury@gmail.com>
Thu, 6 Feb 2025 18:27:30 +0000 (13:27 -0500)
committerGitHub <noreply@github.com>
Thu, 6 Feb 2025 18:27:30 +0000 (13:27 -0500)
commit356a9e646c0e00a8f8941cab1a9bd9d58597fd15
treeabaab96cc93f7d85996cbd0ae2cc1912d2ef1666
parentde84531a3ec5f1f4357983f2e95e0c614b2e744e
[3.13] gh-129668: Fix thread-safety of MemoryError freelist in free threaded build (gh-129704) (gh-129742)

The MemoryError freelist was not thread-safe in the free threaded build.
Use a mutex to protect accesses to the freelist. Unlike other freelists,
the MemoryError freelist is not performance sensitive.

(cherry picked from commit 51b4edb1a4092f60d84f7d14eb41c12085e39c31)
Include/internal/pycore_exceptions.h
Misc/NEWS.d/next/Core and Builtins/2025-02-04-21-26-05.gh-issue-129668.zDanyM.rst [new file with mode: 0644]
Objects/exceptions.c