Skip to content

gh-153182: Explicitly return NULL when new_keys_object call fails in _PyDict_NewKeysForClass#153183

Open
stestagg wants to merge 1 commit into
python:mainfrom
stestagg:gh-153182
Open

gh-153182: Explicitly return NULL when new_keys_object call fails in _PyDict_NewKeysForClass#153183
stestagg wants to merge 1 commit into
python:mainfrom
stestagg:gh-153182

Conversation

@stestagg

@stestagg stestagg commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

This prevents a segfault when code further down the function tries to populate keys with the contents of __static_attributes__

…ails in `_PyDict_NewKeysForClass` to prevent

a segfault when subsequent code tries to use the returned object
@stestagg

stestagg commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @methane!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants