cpython/Parser/pegen
Lysandros Nikolaou 71bb921829
[3.9] bpo-41060: Avoid SEGFAULT when calling GET_INVALID_TARGET in the grammar (GH-21020) (GH-21024)
`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 6c4e0bd974)

Automerge-Triggered-By: @pablogsal
2020-06-20 19:47:22 -07:00
..
parse.c [3.9] bpo-41060: Avoid SEGFAULT when calling GET_INVALID_TARGET in the grammar (GH-21020) (GH-21024) 2020-06-20 19:47:22 -07:00
parse_string.c [3.9] Improve readability and style in parser files (GH-20884) (GH-20885) 2020-06-15 15:08:00 +01:00
parse_string.h bpo-40334: Fix error location upon parsing an invalid string literal (GH-19962) 2020-05-07 11:37:51 +01:00
peg_api.c bpo-40334: Make the PyPegen* and PyParser* APIs more consistent (GH-19839) 2020-05-01 18:30:51 +01:00
pegen.c bpo-40958: Avoid 'possible loss of data' warning on Windows (GH-20970) 2020-06-20 10:35:03 -07:00
pegen.h [3.9] bpo-41060: Avoid SEGFAULT when calling GET_INVALID_TARGET in the grammar (GH-21020) (GH-21024) 2020-06-20 19:47:22 -07:00