]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-134908: Protect `textiowrapper_iternext` with critical section (gh-134910...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 2 Jun 2025 19:16:54 +0000 (21:16 +0200)
committerGitHub <noreply@github.com>
Mon, 2 Jun 2025 19:16:54 +0000 (19:16 +0000)
commit428b0ca1141df55c259d2da186c09dd6e940f30c
tree5ce30e7ca40adecb74333f1a75b7ab3d6d14230e
parent7ac461883dac3cba696db44e357a4860ddfc7beb
[3.14] gh-134908: Protect `textiowrapper_iternext` with critical section (gh-134910) (gh-135039)

The `textiowrapper_iternext` function called `_textiowrapper_writeflush`, but did not
use a critical section, making it racy in free-threaded builds.
(cherry picked from commit 44fb7c361cb24dcf9989a7a1cfee4f6aad5c81aa)

Co-authored-by: Duane Griffin <duaneg@dghda.com>
Lib/test/test_io.py
Misc/NEWS.d/next/Core_and_Builtins/2025-05-30-15-56-19.gh-issue-134908.3a7PxM.rst [new file with mode: 0644]
Modules/_io/textio.c