AndreaBozzo commented on PR #12010:
URL: https://github.com/apache/arrow-rs/pull/12010#issuecomment-6642936378

   > What is the implication of a unaligned load?
   
   Good question. I ran it on GitHub runners (Xeon, Neoverse N2, Apple M1) and 
with Miri. In release builds the old code reads the right values everywhere, no 
crash. In debug builds Rust's alignment check aborts the process. Miri flags 
both reads on main as UB and passes with this PR.
   
   Arm does fault on some misaligned accesses. On both Arm machines an 8 byte 
atomic load that crosses a 16 byte boundary got SIGBUS, but plain loads like 
these two work on these CPUs. So it works today, but it's still UB and the 
compiler is free to assume alignment, which `read_unaligned` takes away.
   
   Probe and results are in this run 
https://github.com/AndreaBozzo/arrow-rs/actions/runs/41917860455
   


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