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
{{ message }}
This repository has been archived by the owner on May 9, 2022. It is now read-only.
looks illegal: mem::zeroed may only be used for types that actually allow zero-initialization, and here this is done for any user-controlled type T. So, e.g. if T is a reference, this is UB as references must not be all-zero.
If you just want to write a bunch of zero bytes to memory, I suggest using write_bytes.
The text was updated successfully, but these errors were encountered:
Heads-up: with rust-lang/rust#66059, this will turn into a panic to protect people from UB. The crater log indicates that the type you are zero-initializing here is &str -- references must indeed never be null.
Cc @JakubOnderka, maintainer of ip_network_table, which according to crater will also be affected when the UB here turns into a panic.
The use of
mem::zeroed
attreebitmap/src/tree_bitmap/allocator.rs
Line 195 in 9540ae5
mem::zeroed
may only be used for types that actually allow zero-initialization, and here this is done for any user-controlled typeT
. So, e.g. ifT
is a reference, this is UB as references must not be all-zero.If you just want to write a bunch of zero bytes to memory, I suggest using
write_bytes
.The text was updated successfully, but these errors were encountered: