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 double-drop in RawTable::clone_from #348

Merged
merged 1 commit into from Jul 17, 2022

Conversation

Amanieu
Copy link
Member

@Amanieu Amanieu commented Jul 16, 2022

If an element from the destination table panics from its Drop impl
then elements from that table would end up being dropped twice, which is
unsound.

If an element from the destination table panics from its `Drop` impl
then elements from that table would end up being dropped twice, which is
unsound.
@Amanieu
Copy link
Member Author

Amanieu commented Jul 17, 2022

@bors r+

@bors
Copy link
Collaborator

bors commented Jul 17, 2022

📌 Commit 83a2a98 has been approved by Amanieu

It is now in the queue for this repository.

@Amanieu Amanieu closed this Jul 17, 2022
@Amanieu Amanieu reopened this Jul 17, 2022
@Amanieu
Copy link
Member Author

Amanieu commented Jul 17, 2022

@bors r+

@bors
Copy link
Collaborator

bors commented Jul 17, 2022

💡 This pull request was already approved, no need to approve it again.

@bors
Copy link
Collaborator

bors commented Jul 17, 2022

📌 Commit 83a2a98 has been approved by Amanieu

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Jul 17, 2022

⌛ Testing commit 83a2a98 with merge bd5ed60...

@bors
Copy link
Collaborator

bors commented Jul 17, 2022

☀️ Test successful - checks-actions
Approved by: Amanieu
Pushing bd5ed60 to master...

@bors bors merged commit bd5ed60 into rust-lang:master Jul 17, 2022
Amanieu added a commit to Amanieu/rust that referenced this pull request Jul 17, 2022
This fixes a double-free in the `clone_from` function if dropping an
existing element in the table panics. See
rust-lang/hashbrown#348 for more details.

The indexmap crate is also updated to use the latest hashbrown version.
Amanieu referenced this pull request in rust-lang/rfcs Jul 17, 2022
cuviper pushed a commit to cuviper/rust that referenced this pull request Jul 17, 2022
This fixes a double-free in the `clone_from` function if dropping an
existing element in the table panics. See
rust-lang/hashbrown#348 for more details.
bjorn3 pushed a commit to rust-lang/rustc_codegen_cranelift that referenced this pull request Jul 25, 2022
This fixes a double-free in the `clone_from` function if dropping an
existing element in the table panics. See
rust-lang/hashbrown#348 for more details.
Mark-Simulacrum pushed a commit to Mark-Simulacrum/rust that referenced this pull request Aug 5, 2022
This fixes a double-free in the `clone_from` function if dropping an
existing element in the table panics. See
rust-lang/hashbrown#348 for more details.
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.

None yet

2 participants