Skip to content

gh-150213: Fix OOM error handling in _interpchannels - #150214

Closed
lpyu001 wants to merge 3 commits into
python:mainfrom
lpyu001:channel
Closed

lpyu001 wants to merge 3 commits into
python:mainfrom
lpyu001:channel

Conversation

@lpyu001

@lpyu001 lpyu001 commented May 22, 2026 •

Copy link
Copy Markdown
Contributor
@lpyu001

lpyu001 commented May 23, 2026

Copy link
Copy Markdown
Contributor Author

The runner was terminated during task execution. Could you please retrigger the failed job? Thank you. @aisk

Comment thread Modules/_interpchannelsmodule.c Outdated
@@ -922,6 +922,7 @@ _channelends_new(void)
{
_channelends *ends = GLOBAL_MALLOC(_channelends);
if (ends== NULL) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (ends== NULL) {
if (ends == NULL) {

style change, while we are here

try:
try:
cid = _channels.create(REPLACE)
except MemoryError:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use with self.assertRaises(MemoryError):

@lpyu001

lpyu001 commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

fix in #151239

@lpyu001 lpyu001 closed this Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants