-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
Improve error handling when read marshal data #101006
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
Labels
3.10
only security fixes
3.11
only security fixes
3.12
only security fixes
type-feature
A feature request or enhancement
Comments
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Jan 13, 2023
* EOFError no longer overrides other errors such as MemoryError or OSError at the start of the object. * Raise more relevant error when the NULL object occurs as a code object component. * Minimize an overhead of calling PyErr_Occurred().
serhiy-storchaka
added a commit
that referenced
this issue
Jun 29, 2023
* EOFError no longer overrides other errors such as MemoryError or OSError at the start of the object. * Raise more relevant error when the NULL object occurs as a code object component. * Minimize an overhead of calling PyErr_Occurred().
This was referenced Jun 29, 2023
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jun 29, 2023
…nGH-101007) * EOFError no longer overrides other errors such as MemoryError or OSError at the start of the object. * Raise more relevant error when the NULL object occurs as a code object component. * Minimize an overhead of calling PyErr_Occurred(). (cherry picked from commit 8bf6904) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jun 29, 2023
…nGH-101007) * EOFError no longer overrides other errors such as MemoryError or OSError at the start of the object. * Raise more relevant error when the NULL object occurs as a code object component. * Minimize an overhead of calling PyErr_Occurred(). (cherry picked from commit 8bf6904) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka
added a commit
that referenced
this issue
Jun 29, 2023
…01007) (GH-106226) * EOFError no longer overrides other errors such as MemoryError or OSError at the start of the object. * Raise more relevant error when the NULL object occurs as a code object component. * Minimize an overhead of calling PyErr_Occurred(). (cherry picked from commit 8bf6904) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka
added a commit
that referenced
this issue
Jun 29, 2023
…01007) (GH-106227) * EOFError no longer overrides other errors such as MemoryError or OSError at the start of the object. * Raise more relevant error when the NULL object occurs as a code object component. * Minimize an overhead of calling PyErr_Occurred(). (cherry picked from commit 8bf6904) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3.10
only security fixes
3.11
only security fixes
3.12
only security fixes
type-feature
A feature request or enhancement
There are several issues in error handling in the marshal module:
Also, it is a common idiom to only call PyErr_Occurred() if the return code denotes a possible error. This is not always used in that code. While the performance gain may be tiny, it is better to get rid of an overhead, it can pay for itself after further optimizations.
Linked PRs
The text was updated successfully, but these errors were encountered: