Closed dwrensha closed 7 years ago
The byteorder crate depends on this kind of transmute working.
Related to #113.
Can you dump the miri trace? Use the envto var MIRI_LOG=trace
to produce it
force_allocation()
sees [u8; 8]
and makes an allocation of alignment 1. Then it calls write_value_to_ptr()
to populate the new allocation with the existing u64
, which has size 8
. In write_uint()
and then get_bytes_mut()
the alignment is then taken and checked as 8
, triggering the error.
OK... we should make transmutes between different alignments always allocate, and use mark_packed.