Skip to content

[Skip Issue] Fix a possible crash due to range_reverse() #10252

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

Merged
merged 1 commit into from
Oct 31, 2018

Conversation

ZackerySpytz
Copy link
Contributor

If any of the PyNumber_* calls fail while the new iterator object is being prepared, a crash will occur during deallocation.

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was an assumption that PyObject_New() fills memory with zeros. Some of object-creating methods do this, but not in this case.

@miss-islington
Copy link
Contributor

Thanks @ZackerySpytz for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 31, 2018
(cherry picked from commit c9a6168)

Co-authored-by: Zackery Spytz <[email protected]>
@bedevere-bot
Copy link

GH-10256 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 31, 2018
(cherry picked from commit c9a6168)

Co-authored-by: Zackery Spytz <[email protected]>
@bedevere-bot
Copy link

GH-10257 is a backport of this pull request to the 3.6 branch.

miss-islington added a commit that referenced this pull request Oct 31, 2018
(cherry picked from commit c9a6168)

Co-authored-by: Zackery Spytz <[email protected]>
miss-islington added a commit that referenced this pull request Oct 31, 2018
(cherry picked from commit c9a6168)

Co-authored-by: Zackery Spytz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants