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
Check for errors when using PyTokenizer_FindEncoding() #48023
Comments
The patch adds two lines to call_find_module() to check for errors after |
In PyTokenizer_FindEncoding(), PyMem_MALLOC may return NULL. |
If PyMem_MALLOC() returns NULL, shouldn't MemoryError be set? |
Right, here is an updated patch |
Your patch looks fine, Amaury. |
I think this patch should be reverted. It causes a linking error because |
pgen does not exist on Windows... What if I simply remove the call to PyErr_NoMemory? |
On Thu, Sep 4, 2008 at 5:48 PM, Amaury Forgeot d'Arc
That sounds ok. I can't remember what the rest of the parse does when
|
You could also surround the PyErr_NoMemory with #ifndef PGEN. |
committed r66224 + r66225. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: