-
Notifications
You must be signed in to change notification settings - Fork 290
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
Announcing Rust 1.70.0 #1110
Announcing Rust 1.70.0 #1110
Conversation
This definitely needs more work, but a PR will let others start chipping in. |
It looks like this didn't get a milestone, somehow, but I think rust-lang/rust#98112 landed in this release? We know that there's UB code in the wild that trips those checks (rust-lang/rust#111487), so might be worth a mention here. A placeholder example, please change as desired: #[repr(align(8))]
struct AlignedArray([u8; 8]);
let a = AlignedArray([0; 8]);
// This dereference is definitely under-aligned, and thus UB
let s = unsafe { *a.0.as_ptr().add(1).cast::<f32>() };
dbg!(s);
|
That is in the full release notes, "Insert alignment checks for pointer dereferences as debug assertions" under compatibility. I'm not sure it's worth highlighting more than that, but I could be convinced... |
Co-authored-by: LegionMammal978 <mattlloydhouse@gmail.com>
Co-authored-by: Nathan Stocks <cleancut@github.com>
No description provided.