Skip to content

Fix bug in extern spec for from_raw_parts_mut#51

Merged
vrindisbacher merged 1 commit intomasterfrom
vrindisbacher/fix-extern-spec-bug
Oct 23, 2025
Merged

Fix bug in extern spec for from_raw_parts_mut#51
vrindisbacher merged 1 commit intomasterfrom
vrindisbacher/fix-extern-spec-bug

Conversation

@vrindisbacher
Copy link
Collaborator

In taking a look at something that popped up in Tock, I realized (doh!) that there was a precondition missing for from_raw_parts_mut which is needed to prevent UB. This adds said precondition and also adds explicit reasoning for alignment, and overflow conditions.

@vrindisbacher vrindisbacher merged commit 104a477 into master Oct 23, 2025
0 of 11 checks passed
@vrindisbacher vrindisbacher deleted the vrindisbacher/fix-extern-spec-bug branch October 23, 2025 19:02
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.

1 participant