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 mut on AssertZeroizeOnDrop #719

Merged
merged 1 commit into from Jan 27, 2022

Conversation

daxpedda
Copy link
Contributor

I found that this doesn't work. I hope this is not considered a breaking change?

Comment on lines +246 to +256
#[derive(ZeroizeOnDrop)]
struct X([u8; 3]);

#[derive(ZeroizeOnDrop)]
struct Z(X);

let mut value = Z(X([1, 2, 3]));
unsafe {
std::ptr::drop_in_place(&mut value);
}
assert_eq!(&value.0 .0, &[0, 0, 0])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This describes the issue that is not compilable without this fix.

@tarcieri
Copy link
Member

Can merge this, yank zeroize v1.5.0 due to the bug, and hope for the best regarding compatibility of existing code

@tarcieri tarcieri merged commit 44bed6e into RustCrypto:master Jan 27, 2022
@tarcieri tarcieri mentioned this pull request Jan 27, 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.

None yet

2 participants