bpo-40334: Improvements to error-handling code in the PEG parser#20003
bpo-40334: Improvements to error-handling code in the PEG parser#20003pablogsal merged 5 commits into
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.
|
Note to self: This partially conflicts with #19987, so will probably need to merge master after that's landed. |
Sorry, something went wrong.
|
Sorry, something went wrong.
I can't really see this, how exactly is this? |
Sorry, something went wrong.
I have checked again and this only happens when the rule does not return |
Sorry, something went wrong.
|
Resolved the conflicts so that we can hopefully merge this and close bpo-40334. |
Sorry, something went wrong.
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Done! Sorry, it's getting late.. |
Sorry, something went wrong.
No problem. I want to land this and the other PR so they both make it to beta 1 which is next Monday :) |
Sorry, something went wrong.
…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>
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