-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-40334: Improvements to error-handling code in the PEG parser #20003
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_indicator
is set, in case malloc or realloc failPyErr_NoMemory()
instead ofPyErr_Format()
, because itrequires no memory
https://bugs.python.org/issue40334