You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As stated in the title, the behavior of mem::zeroed() seems to have changed on the nightly channel and now panics when called with ash::Device as the type parameter. This is causing vk_mem::AllocatorCreateInfo::default() to panic in the vk_mem crate.
info: latest update on 2020-09-27, rust version 1.48.0-nightly (623fb90b5 2020-09-26)
$ cargo +nightly-2020-09-27 test
...
running 1 test
test zeroed ... ok
And started failing with
info: latest update on 2020-09-28, rust version 1.48.0-nightly (7f7a1cbfd 2020-09-27)
$ cargo +nightly-2020-09-28 test
...
running 1 test
test zeroed ... FAILED
failures:
---- zeroed stdout ----
thread 'zeroed' panicked at 'attempted to zero-initialize type `ash::Device`, which is invalid', /rustc/7f7a1cbfd3b55daee191247770627afab09eece2\library\core\src\mem\mod.rs:622:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
The text was updated successfully, but these errors were encountered:
I don't think this is a bug, it's a soundness fix. What's the definition of ash::Device? Not all types are valid as zeroed, for example mem::zeroed<Box<usize>>() is immediate UB.
@jyn514 It contains function pointers. I suspected the same, but wanted to confirm and report anyway as it will cause a breaking change when it reaches the stable channel.
As stated in the title, the behavior of
mem::zeroed()
seems to have changed on the nightly channel and now panics when called withash::Device
as the type parameter. This is causingvk_mem::AllocatorCreateInfo::default()
to panic in the vk_mem crate.The last nightly to behave the same as stable
And started failing with
The text was updated successfully, but these errors were encountered: