Skip to content
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

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

Merged
merged 1 commit into from Oct 31, 2018

Conversation

ZackerySpytz
Copy link
Contributor

@ZackerySpytz ZackerySpytz commented Oct 31, 2018

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

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

miss-islington commented Oct 31, 2018

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 <zspytz@gmail.com>
@bedevere-bot
Copy link

bedevere-bot commented Oct 31, 2018

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 <zspytz@gmail.com>
@bedevere-bot
Copy link

bedevere-bot commented Oct 31, 2018

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 <zspytz@gmail.com>
miss-islington added a commit that referenced this pull request Oct 31, 2018
(cherry picked from commit c9a6168)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
yahya-abou-imran pushed a commit to yahya-abou-imran/cpython that referenced this pull request Nov 2, 2018
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.

None yet

5 participants