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

Fix soundness issues w/r ExactSizeIterator #2124

Merged
merged 7 commits into from
Jan 27, 2022
Merged

Fix soundness issues w/r ExactSizeIterator #2124

merged 7 commits into from
Jan 27, 2022

Conversation

mejrs
Copy link
Member

@mejrs mejrs commented Jan 24, 2022

Fixes #2118

src/types/list.rs Outdated Show resolved Hide resolved
Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

Lovely work, thank you! Excellent set of tests. I think worthy of a CHANGELOG?

I only commented on the list implementation, however all comments apply equally to the tuple case too.

src/types/list.rs Outdated Show resolved Hide resolved
src/types/list.rs Outdated Show resolved Hide resolved
src/types/list.rs Outdated Show resolved Hide resolved
src/types/list.rs Show resolved Hide resolved
src/types/list.rs Show resolved Hide resolved
@mejrs mejrs requested a review from davidhewitt January 25, 2022 16:01
@davidhewitt
Copy link
Member

Looks great! I just want to take a moment to play with this locally to confirm if the &dyn mut has noticeable benchmark / code size impact. Hopefully tomorrow at some point...

Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

Yep works great!

@davidhewitt davidhewitt merged commit 840a2ad into PyO3:main Jan 27, 2022
@mejrs
Copy link
Member Author

mejrs commented Jan 27, 2022

I just want to take a moment to play with this locally to confirm if the &dyn mut has noticeable benchmark / code size impact.

@davidhewitt did it make a difference? I'm curious now :)

@davidhewitt
Copy link
Member

No measurable perf difference. Code size - a little bit, figured as I couldn't see a perf change overall it seemed right 👍

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.

Usage of ExactSizeIterator is incorrect
2 participants