Skip to content

[3.15] gh-152635: Raise MemoryError when the lock allocation fails in _interpchannels.create() (GH-152642) - #152671

Merged
sobolevn merged 1 commit into
python:3.15from
miss-islington:backport-b383aa6-3.15
Jun 30, 2026
Merged

sobolevn merged 1 commit into
python:3.15from
miss-islington:backport-b383aa6-3.15

Conversation

@miss-islington

@miss-islington miss-islington commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

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.
(cherry picked from commit b383aa6)

Co-authored-by: Steve Stagg stestagg@gmail.com
Co-authored-by: sobolevn mail@sobolevn.me

…`_interpchannels.create()` (pythonGH-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.
(cherry picked from commit b383aa6)

Co-authored-by: Steve Stagg <stestagg@gmail.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
@sobolevn
sobolevn enabled auto-merge (squash) June 30, 2026 10:58
@sobolevn
sobolevn merged commit 0d76fdb into python:3.15 Jun 30, 2026
50 checks passed
@miss-islington
miss-islington deleted the backport-b383aa6-3.15 branch June 30, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants