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
While this has been discussed before, it's not explicitly documented in the reference.
A few open questions:
Does it make sense to speak about uninitialized bytes in general, or only about padding bytes? Does Rust currently have other forms of uninitialized bytes?
Does it make sense to also define that uninitialized bytes cannot be "observed"? Currently, the closest that we have to this is statements on bit validity for various primitive types, which refer to uninitialized bytes, but do not define what they are (e.g., bools, numeric types, etc).
I could see an argument that we don't need to talk about "observing" in the general sense; it is sufficient to define that it is UB to transmute an uninitialized byte to another type. In fact, it should technically be sufficient not to define that it is sound to transmute an uninitialized byte to a type; since there are no types for which this is sound, there exists no soundness proof for code which would attempt to do this regardless of "intermediate" type.
Where would be best to document this?
The text was updated successfully, but these errors were encountered:
While this has been discussed before, it's not explicitly documented in the reference.
A few open questions:
The text was updated successfully, but these errors were encountered: