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 intopython:masterfrom
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. |
|
I can't really see this, how exactly is this? |
I have checked again and this only happens when the rule does not return |
|
Resolved the conflicts so that we can hopefully merge this and close bpo-40334. |
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
@lysnikolaou You need to regenerate the parser 😉 |
Done! Sorry, it's getting late.. |
No problem. I want to land this and the other PR so they both make it to beta 1 which is next Monday :) |
…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