-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
In _PyIO_trap_eintr(), check if "val" is not an OSError after PyErr_NormalizeException() #9929
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
base: main
Are you sure you want to change the base?
In _PyIO_trap_eintr(), check if "val" is not an OSError after PyErr_NormalizeException() #9929
Conversation
…ormalizeException()
@ZackerySpytz Could you open an issue explaining the underlying concern? Is this something you witnessed concretely? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for submitting this PR. See comment below. Also, please open an issue about this.
@@ -784,8 +784,12 @@ _PyIO_trap_eintr(void) | |||
return 0; | |||
PyErr_Fetch(&typ, &val, &tb); | |||
PyErr_NormalizeException(&typ, &val, &tb); | |||
assert(val != NULL); | |||
if (!PyObject_TypeCheck(val, (PyTypeObject *)PyExc_OSError)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a comment explaining why this check is necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is LGTM...?
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
LGTM, but please add comments. |
what is LGTM ? |
LGTM = Looks Good To Me. |
@ZackerySpytz , please address the review comments. Thanks! |
@ZackerySpytz ping |
This PR is stale because it has been open for 30 days with no activity. |
It is not safe to assume that "val" will be an OSError after
PyErr_NormalizeException(). "val" may be an arbitrary exception (for
example, MemoryError) if an error occurs during the
PyErr_NormalizeException() call.