Skip to content

[3.9] bpo-41060: Avoid SEGFAULT when calling GET_INVALID_TARGET in the grammar (GH-21020) #21024

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

Merged
merged 1 commit into from
Jun 21, 2020

Conversation

lysnikolaou
Copy link
Member

@lysnikolaou lysnikolaou commented Jun 21, 2020

GET_INVALID_TARGET might unexpectedly return NULL, which if not
caught will cause a SEGFAULT. Therefore, this commit introduces a new
inline function RAISE_SYNTAX_ERROR_INVALID_TARGET that always
checks for GET_INVALID_TARGET returning NULL and can be used in
the grammar, replacing the long C ternary operation used till now.

(cherry picked from commit 6c4e0bd)

https://bugs.python.org/issue41060

Automerge-Triggered-By: @pablogsal

…mar (pythonGH-21020)

`GET_INVALID_TARGET` might unexpectedly return `NULL`, which if not
caught will cause a SEGFAULT. Therefore, this commit introduces a new
inline function `RAISE_SYNTAX_ERROR_INVALID_TARGET` that always
checks for `GET_INVALID_TARGET` returning NULL and can be used in
the grammar, replacing the long C ternary operation used till now.

(cherry picked from commit 6c4e0bd)
@lysnikolaou lysnikolaou requested a review from pablogsal as a code owner June 21, 2020 02:28
@lysnikolaou lysnikolaou changed the title bpo-41060: Avoid SEGFAULT when calling GET_INVALID_TARGET in the grammar (GH-21020) [3.9] bpo-41060: Avoid SEGFAULT when calling GET_INVALID_TARGET in the grammar (GH-21020) Jun 21, 2020
@miss-islington
Copy link
Contributor

@lysnikolaou: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit 71bb921 into python:3.9 Jun 21, 2020
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.

5 participants