-
-
Notifications
You must be signed in to change notification settings - Fork 30k
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-35269: Fix a possible segfault involving a newly-created coroutine #10585
bpo-35269: Fix a possible segfault involving a newly-created coroutine #10585
Conversation
coro->cr_origin wasn't initialized if compute_cr_origin() failed in PyCoro_New(), which would cause a crash during the coroutine's deallocation.
Py_DECREF(coro); | ||
return NULL; | ||
} | ||
((PyCoroObject *)coro)->cr_origin = cr_origin; |
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.
The PR can be reduced to very trivial change: move this line before if (!cr_origin) {
, do nothing else
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.
Sure, but I had wanted to use the opportunity to simplify the code.
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 |
I have made the requested changes; please review again. |
Thanks for making the requested changes! @asvetlov: please review the changes made to this pull request. |
Thanks @ZackerySpytz for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7. |
pythonGH-10585) coro->cr_origin wasn't initialized if compute_cr_origin() failed in PyCoro_New(), which would cause a crash during the coroutine's deallocation. https://bugs.python.org/issue35269 (cherry picked from commit 062a57b) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
GH-10590 is a backport of this pull request to the 3.7 branch. |
GH-10585) coro->cr_origin wasn't initialized if compute_cr_origin() failed in PyCoro_New(), which would cause a crash during the coroutine's deallocation. https://bugs.python.org/issue35269 (cherry picked from commit 062a57b) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
Belated 👍, thanks @ZackerySpytz and @asvetlov for handling this! |
coro->cr_origin wasn't initialized if compute_cr_origin() failed in
PyCoro_New(), which would cause a crash during the coroutine's
deallocation.
https://bugs.python.org/issue35269