Skip to content

gh-153210: Fix array module import crash under a memory pressure#153238

Merged
sobolevn merged 1 commit into
python:mainfrom
sobolevn:issue-153210
Jul 7, 2026
Merged

gh-153210: Fix array module import crash under a memory pressure#153238
sobolevn merged 1 commit into
python:mainfrom
sobolevn:issue-153210

Conversation

@sobolevn

@sobolevn sobolevn commented Jul 6, 2026

Copy link
Copy Markdown
Member

Note that PyModule_AddObjectRef was not required, because if (PyModule_AddType(m, state->ArrayType) < 0) is used right after that overriding the module registation. Now it is only registered once.

@serhiy-storchaka serhiy-storchaka left a comment

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.

LGTM. 👍

@sobolevn sobolevn added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Jul 7, 2026
@sobolevn sobolevn merged commit 12ed8b1 into python:main Jul 7, 2026
110 of 112 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @sobolevn for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Jul 7, 2026

Copy link
Copy Markdown

GH-153249 is a backport of this pull request to the 3.15 branch.

@miss-islington-app

Copy link
Copy Markdown

Sorry, @sobolevn, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 12ed8b16feb3502cea427ff846e9d0b3d7fef721 3.13

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jul 7, 2026
@bedevere-app

bedevere-app Bot commented Jul 7, 2026

Copy link
Copy Markdown

GH-153250 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jul 7, 2026
@bedevere-app

bedevere-app Bot commented Jul 7, 2026

Copy link
Copy Markdown

GH-153251 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Jul 7, 2026
sobolevn added a commit that referenced this pull request Jul 7, 2026
sobolevn added a commit that referenced this pull request Jul 7, 2026
…sure (GH-153238) (#153250)

gh-153210: Fix `array` module import crash under a memory pressure (GH-153238)
(cherry picked from commit 12ed8b1)

Co-authored-by: sobolevn <mail@sobolevn.me>
sobolevn added a commit that referenced this pull request Jul 7, 2026
…sure (GH-153238) (#153249)

gh-153210: Fix `array` module import crash under a memory pressure (GH-153238)
(cherry picked from commit 12ed8b1)

Co-authored-by: sobolevn <mail@sobolevn.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants