bpo-44143: Fix crash in the parser when raising tokenizer errors with an exception set#26144
Merged
pablogsal merged 1 commit intopython:mainfrom May 15, 2021
Merged
bpo-44143: Fix crash in the parser when raising tokenizer errors with an exception set#26144pablogsal merged 1 commit intopython:mainfrom
pablogsal merged 1 commit intopython:mainfrom
Conversation
… an exception set
isidentical
approved these changes
May 15, 2021
| if (p->tok->level != 0) { | ||
| int error_lineno = p->tok->parenlinenostack[p->tok->level-1]; | ||
| if (current_err_line > error_lineno) { | ||
| PyErr_Clear(); |
Member
There was a problem hiding this comment.
Is there any chance this code path might be hit with some other kind of error (e.g IndentationError, UnicodeDecodeError, MemoryError etc)? If not LGTM
Member
Author
There was a problem hiding this comment.
Nop, only PyExc_SyntaxError
Contributor
|
Thanks @pablogsal for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10. |
|
GH-26148 is a backport of this pull request to the 3.10 branch. |
pablogsal
added a commit
that referenced
this pull request
May 15, 2021
… an exception set (GH-26144) (GH-26148) (cherry picked from commit 80b0891) Co-authored-by: Pablo Galindo <[email protected]>
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.
https://bugs.python.org/issue44143