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

bpo-38525: Fix a segmentation fault when using reverse iterators of empty dict #16846

Merged
merged 8 commits into from
Oct 19, 2019

Conversation

corona10
Copy link
Member

@corona10 corona10 commented Oct 19, 2019

Lib/test/test_dict.py Outdated Show resolved Hide resolved
Lib/test/test_dict.py Outdated Show resolved Hide resolved
@pablogsal
Copy link
Member

CC: @remilapeyre

Copy link
Member

@pablogsal pablogsal left a comment

Choose a reason for hiding this comment

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

Good work! I have left some minor comments and suggestions

@bedevere-bot
Copy link

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. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

And if you don't make the requested changes, you will be put in the comfy chair!

@corona10 corona10 changed the title bpo-38525: Fix dictreviter_iternext for empty dict bpo-38525: Fix a segmentation fault when using reverse iterators of empty dict Oct 19, 2019
@corona10
Copy link
Member Author

@pablogsal

Thanks for the suggestion!
I've updated the PR :)

Lib/test/test_dict.py Outdated Show resolved Hide resolved
Lib/test/test_dict.py Show resolved Hide resolved
Lib/test/test_dict.py Outdated Show resolved Hide resolved
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 is other problem here. See bpo for details.

@bedevere-bot
Copy link

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. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@remilapeyre
Copy link
Contributor

Sorry for botching that, I will look into the issue with shared keys

@pablogsal pablogsal merged commit 24dc2f8 into python:master Oct 19, 2019
@miss-islington
Copy link
Contributor

Thanks @corona10 for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

I'm having trouble backporting to 3.8. Reason: 'Error 110 while writing to socket. Connection timed out.'. Please retry by removing and re-adding the needs backport to 3.8 label.

@miss-islington
Copy link
Contributor

Thanks @corona10 for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-16853 is a backport of this pull request to the 3.8 branch.

miss-islington added a commit that referenced this pull request Oct 19, 2019
…mpty dict (GH-16846)

The reverse iterator for empty dictionaries was not handling correctly shared-key dictionaries.
(cherry picked from commit 24dc2f8)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
@corona10 corona10 deleted the bpo-38525 branch October 20, 2019 00:40
@vstinner
Copy link
Member

Nice contributions @corona10, it's rare to have to fix a bug in the dict implementation :-)

jacobneiltaylor pushed a commit to jacobneiltaylor/cpython that referenced this pull request Dec 5, 2019
…mpty dict (pythonGH-16846)

The reverse iterator for empty dictionaries was not handling correctly shared-key dictionaries.
shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Jan 31, 2020
…mpty dict (pythonGH-16846)

The reverse iterator for empty dictionaries was not handling correctly shared-key dictionaries.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants