]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-134908: Protect `textiowrapper_iternext` with critical section (gh-134910...
authorSam Gross <colesbury@gmail.com>
Mon, 2 Jun 2025 19:40:42 +0000 (15:40 -0400)
committerGitHub <noreply@github.com>
Mon, 2 Jun 2025 19:40:42 +0000 (19:40 +0000)
commita9b8ffd9b9031d5b976a4de54468418118a24bf4
treec51199518410c7694ad03efbf88e0b460e365295
parent7ca17edd13c77a38d1a7b7f3c0becff63f7e2506
[3.13] gh-134908: Protect `textiowrapper_iternext` with critical section (gh-134910) (gh-135040)

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