### Bug description: https://github.com/python/cpython/blob/0ed497a350d76dd20de1a1689c84426c7c1d6e22/Modules/_io/winconsoleio.c#L676-L679 `PyErr_NoMemory` will call `_PyThreadState_GET`, which will return `NULL` without holding the GIL and leading to crash. A PR is on the way. ### CPython versions tested on: CPython main branch ### Operating systems tested on: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-149984 * gh-150111 * gh-150112 * gh-150113 <!-- /gh-linked-prs -->
Bug description:
cpython/Modules/_io/winconsoleio.c
Lines 676 to 679 in 0ed497a
PyErr_NoMemorywill call_PyThreadState_GET, which will returnNULLwithout holding the GIL and leading to crash.A PR is on the way.
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs