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 uniqueness in last_mut() #1429

Merged
merged 1 commit into from
Aug 21, 2024
Merged

Fix uniqueness in last_mut() #1429

merged 1 commit into from
Aug 21, 2024

Conversation

bluss
Copy link
Member

@bluss bluss commented Aug 21, 2024

Last mut did not ensure the array was unique before calling uget_mut. The required properties were protected by a debug assertion, but a clear bug in release mode.

Adding tests that would have caught this.

Fixes #1427

Last mut did not ensure the array was unique before calling uget_mut.
The required properties were protected by a debug assertion, but a clear
bug in release mode.

Adding tests that would have caught this.
Copy link
Collaborator

@akern40 akern40 left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for fixing this, I was going to get to it later this week but couldn't when I found the bug.

@bluss
Copy link
Member Author

bluss commented Aug 21, 2024

Well found, I'm sorry for stealing it 🙂

@bluss bluss added this to the 0.16.x milestone Aug 21, 2024
@bluss bluss merged commit 1304f9d into master Aug 21, 2024
12 checks passed
@bluss bluss deleted the fix-last-mut branch August 21, 2024 16:16
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.

Unsoundness in last_mutfor Arc- and CowArrays
2 participants