Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #6: Fix UBSan "misaligned-pointer-use" warning on aarch64
1ac401e Fix UBSan "misaligned-pointer-use" warning on aarch64 (Hennadii Stepanov) Pull request description: As `data` type is a pointer to `uint8_t`, the access to the memory via the `(uint64_t *)data` pointer is misaligned. It can be an issue on ARM hardware. As suggested in https://en.cppreference.com/w/cpp/language/reinterpret_cast: > When it is needed to interpret the bytes of an object as a value of a different type, `std::memcpy` ... can be used. For more details, please refer to bitcoin/bitcoin#29178. Also: https://stackoverflow.com/questions/32062894/take-advantage-of-arm-unaligned-memory-access-while-writing-clean-c-code. ACKs for top commit: theuni: ACK 1ac401e. dergoegge: ACK 1ac401e Tree-SHA512: c459da5571dd607a742ed4d7d3aece264bbde83d30d62c500bf0708eadc3b101e505f7f5b6fd453650aea63703909d776db151b234845c414944913fecb5a862
- Loading branch information