jhorstmann opened a new issue #1410:
URL: https://github.com/apache/arrow-rs/issues/1410


   The following test fails when run under miri:
   
   ```
       #[test]
       fn mutable_push_unaligned_u64() {
           let mut buf = MutableBuffer::new(16);
           buf.push(1_u8);
           buf.push(1_u64);
           assert_eq!(9, buf.len());
           assert_eq!(&[1u8, 1u8, 0, 0, 0, 0, 0, 0, 0], buf.as_slice());
       }
   ```
   
   The code uses `std::ptr::write` to append the u64, regardless of the current 
alignment. Replacing that with `write_unaligned` would probably work. The type 
parameter is constrained by the `ToByteSlice` trait, but it seems the trait is 
not actually used. Not sure whether this is expected. It seems `ToByteSlice` is 
more of a marker trait here that indicates that the contents can be transmuted 
to a slice of bytes.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to