{{ message }}
bpo-40334: Improvements to error-handling code in the PEG parser - #20003
Merged
Conversation
Following improvements are implemented in this PR: - `p->error_indicator` is set, in case malloc or realloc fail - Avoid memory leaks in the case that realloc fails - Call `PyErr_NoMemory()` instead of `PyErr_Format()`, because it requires no memory.
Member
Author
lysnikolaou
requested review from
gvanrossum and
pablogsal
and removed request for
gvanrossum and
pablogsal
May 11, 2020 15:22
Member
|
Member
Author
I can't really see this, how exactly is this? |
Member
I have checked again and this only happens when the rule does not return |
Member
Author
|
Resolved the conflicts so that we can hopefully merge this and close bpo-40334. |
pablogsal
reviewed
May 17, 2020
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Member
|
@lysnikolaou You need to regenerate the parser 😉 |
Member
Author
Done! Sorry, it's getting late.. |
Member
arturoescaip
pushed a commit
to arturoescaip/cpython
that referenced
this pull request
May 24, 2020
…honGH-20003) The following improvements are implemented in this commit: - `p->error_indicator` is set, in case malloc or realloc fail. - Avoid memory leaks in the case that realloc fails. - Call `PyErr_NoMemory()` instead of `PyErr_Format()`, because it requires no memory. Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
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.

Following improvements are implemented in this PR:
p->error_indicatoris set, in case malloc or realloc failPyErr_NoMemory()instead ofPyErr_Format(), because itrequires no memory
https://bugs.python.org/issue40334