Bug report
Bug description:
In the free-threaded build, new_threadstate() reserves a QSBR thread-state slot and a TLBC index before it can fail for other reasons, but the failure paths only free the _PyThreadStateImpl.
Found while reviewing GH-148953. I think explaining the monotonic memory growth in the corresponding issue is unlikely, since this leak only happens in the failure case. Still good to fix though.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
Bug report
Bug description:
In the free-threaded build,
new_threadstate()reserves a QSBR thread-state slot and a TLBC index before it can fail for other reasons, but the failure paths only free the _PyThreadStateImpl.Found while reviewing GH-148953. I think explaining the monotonic memory growth in the corresponding issue is unlikely, since this leak only happens in the failure case. Still good to fix though.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs