gh-153182: Explicitly return NULL when `new_keys_object` call fails in `_PyDict_NewKeysForClass` by stestagg · Pull Request #153183 · python/cpython · GitHub
Skip to content

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

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

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

@kumaraditya303

Copy link
Copy Markdown
Contributor

There is a merge conflict.

@stestagg

stestagg commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

@stestagg stestagg closed this Jul 7, 2026
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.

3 participants