Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.12] gh-126105: Fix crash in ast module, when ._fields is delet… #126132

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

Eclips4
Copy link
Member

@Eclips4 Eclips4 commented Oct 29, 2024

…ed (GH-126115)

Previously, if the ast.AST._fields attribute was deleted, attempts to create a new ast node would crash due to the assumption that _fields always had a non-NULL value. Now it has been fixed by adding an extra check to ensure that _fields does not have a NULL value (this can happen when you manually remove _fields attribute). (cherry picked from commit b2eaa75)

… deleted (pythonGH-126115)

Previously, if the `ast.AST._fields` attribute was deleted, attempts to create a new `as`t node would crash due to the assumption that `_fields` always had a non-NULL value. Now it has been fixed by adding an extra check to ensure that `_fields` does not have a NULL value (this can happen when you manually remove `_fields` attribute).
(cherry picked from commit b2eaa75)

Co-authored-by: sobolevn <mail@sobolevn.me>
@Eclips4 Eclips4 merged commit 515a5d3 into python:3.12 Oct 29, 2024
32 checks passed
@Eclips4 Eclips4 deleted the backport-b2eaa75-3.12 branch October 29, 2024 18:20
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