Address new nightly unsafe precondition check panics#2841
Conversation
|
Thank you for looking into this. It seems there's still one more failure: Which indirectly points to windows-rs/crates/libs/core/src/event.rs Lines 161 to 167 in 40f671b But that looks totally fine on its own. The empty case is checked and I very strongly doubt the size exceeds So looking at windows-rs/crates/libs/core/src/event.rs Lines 205 to 216 in 40f671b It uses HeapAlloc, which aligns to 16 (or 8 on 32-bit) but then it writes a header which, is essentially an Quick fix here would be to add an |
|
Thanks all. |
|
I'll probably publish an update to crates.io soon to avoid dependents having issues with nightly. |
|
But we should probably get the feature doc search feature integrated before then. Let me know if there's anything else top of mind. |
Passing size=0, ptr=0 into
std::slice::from_raw_partsis undefined behavior and is no longer safe to rely upon. Also addresses an unaligned pointer used byEvent.See also:
rust-lang/rust#120902
rust-lang/rust#120594