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

vec::IntoIter fixes #181

Merged
merged 2 commits into from
Oct 18, 2022
Merged

vec::IntoIter fixes #181

merged 2 commits into from
Oct 18, 2022

Conversation

main--
Copy link
Contributor

@main-- main-- commented Oct 14, 2022

Ran into these issues while tracking down a memory leak.

IntoIter was missing a 'borrow lifetime parameter, leading to trivial
use-after-free issues (fixes fitzgen#187).
Both Vec and Drain drop leftover elements when they are dropped.
It would be inconsistent for IntoIter to just leak them.
@konsumlamm
Copy link
Contributor

This fixes #178.

Copy link
Owner

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

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

Thanks! One comment to be addressed before this can merge.

src/collections/vec.rs Show resolved Hide resolved
Copy link
Owner

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

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

Thanks again!

@fitzgen fitzgen merged commit f63d768 into fitzgen:main Oct 18, 2022
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.

3 participants