]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-152635: Raise MemoryError when the lock allocation fails in `_interpchannels.creat...
authorSteve Stagg <stestagg@gmail.com>
Tue, 30 Jun 2026 10:57:28 +0000 (11:57 +0100)
committerGitHub <noreply@github.com>
Tue, 30 Jun 2026 10:57:28 +0000 (13:57 +0300)
commitb383aa6e1a8ea53fdeed88c71fbc34d8b2d1fde9
tree4a48b402ab29e9fc97c622b4314acff4eb6a30d0
parent03efeef226b774f937056e95e0cdb8f7d37c6532
gh-152635: Raise MemoryError when the lock allocation fails in `_interpchannels.create()` (#152642)

Previously, an allocation failure when creating
the lock for a channel in `_interpchannels` would trigger an assert.
Caused by `handle_channel_error` being passed an error code of -1
which is only allowed if an exception has been set.
(in this case, no exception was set)

`channelsmod_create` now forwards the error code from `channel_create`
which `handle_channel_error` already handled.

Co-authored-by: sobolevn <mail@sobolevn.me>
Misc/NEWS.d/next/Core_and_Builtins/2026-06-29-23-29-14.gh-issue-152635.O21J0O.rst [new file with mode: 0644]
Modules/_interpchannelsmodule.c