[3.9] bpo-45820: Fix a segfault when the parser fails without reading any input (GH-29580)#29584
Merged
ambv merged 2 commits intopython:3.9from Nov 18, 2021
Merged
Conversation
…nput (pythonGH-29580) (cherry picked from commit df4ae55) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Contributor
Author
|
@pablogsal: Status check is done, and it's a success ✅ . |
pablogsal
approved these changes
Nov 16, 2021
ambv
reviewed
Nov 17, 2021
Parser/pegen/pegen.c
Outdated
| if (p->fill == 0) { | ||
| va_list va; | ||
| va_start(va, errmsg); | ||
| _PyPegen_raise_error_known_location(p, errtype, 0, 0, 0, -1, errmsg, va); |
Contributor
There was a problem hiding this comment.
_PyPegen_raise_error_known_location only gained end_lineno and end_col_offset in 3.10+ in GH-25525.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(cherry picked from commit df4ae55)
Co-authored-by: Pablo Galindo Salgado Pablogsal@gmail.com
https://bugs.python.org/issue45820