FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-145623: Fix crashes on uninitialized struct.Struct objects by raminfp · Pull Request #145624 · python/cpython · GitHub

Repository navigation

gh-145623: Fix crashes on uninitialized struct.Struct objects - #145624

Merged
corona10 merged 2 commits into
python:mainfrom
raminfp:fix-gh-145623-struct-uninitialized-crash
Mar 7, 2026
Merged

corona10 merged 2 commits into
python:mainfrom
raminfp:fix-gh-145623-struct-uninitialized-crash

Conversation

raminfp commented Mar 7, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

Add ENSURE_STRUCT_IS_READY() checks to Struct.__sizeof__() and Struct.__repr__() to prevent crashes when called on uninitialized Struct objects.

raminfp added 2 commits March 7, 2026 15:18
Add ENSURE_STRUCT_IS_READY() checks to Struct.__sizeof__() and
Struct.__repr__() to prevent NULL pointer dereference and invalid
memory read when called on a Struct created via __new__() without
__init__().
corona10 added needs backport to 3.13 only security fixes needs backport to 3.14 bugs and security fixes labels Mar 7, 2026

corona10 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

lgtm!

corona10 merged commit 2cf6b2c into python:main Mar 7, 2026
62 checks passed

Copy link
Copy Markdown

Thanks @raminfp for the PR, and @corona10 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

Copy link
Copy Markdown

Sorry, @raminfp and @corona10, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 2cf6b2caade94e75f10363df6f432a3e6515be6c 3.14

Copy link
Copy Markdown

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

cherry_picker 2cf6b2caade94e75f10363df6f432a3e6515be6c 3.13

corona10 commented Mar 7, 2026

Copy link
Copy Markdown
Member

@raminfp In my local environment, Python 3.14 and 3.13 have same issue, would you like to create a backport patch for this?

bedevere-app Bot commented Mar 7, 2026

Copy link
Copy Markdown

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

bedevere-app Bot commented Mar 7, 2026

Copy link
Copy Markdown

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

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

3 participants


Back | FazBrowse Home | New Git URL