ethantang93 commented on code in PR #10507:
URL: https://github.com/apache/arrow-rs/pull/10507#discussion_r3716503790


##########
arrow-ipc/src/reader.rs:
##########
@@ -3797,7 +3798,7 @@ mod tests {
             let width = data_type.primitive_width().unwrap();
             let data = ArrayData::builder(data_type)
                 .len(len)
-                .add_buffer(Buffer::from(vec![0_u8; len * width]))
+                .add_buffer(Buffer::from(MutableBuffer::from_len_zeroed(len * 
width)))

Review Comment:
   yeah i think this is one issue miri found, was getting an error 
```"Misaligned buffers[0] in array of type Int32,
        offset from expected alignment of 4 by 2" ```
   based on my (limited) understanding `vec![0_u8; len * width] ` only 
guarantees 1 byte alignment, so it can be misaligned for wider primitives. 



-- 
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