You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `aarch64` and `x86_64` architectures have alignment differences for `u128` type:
* `aarch64` has 16 bytes alignment
* `x86_64` has 8 bytes aligment
In order to fix the issue we're going to use `[u8; 16]` instead of `u128`, which will always have alignment of 8 bytes and have backwards compatibility with existing `x86_64` serialized data.
See the following issues for more details:
* rust-lang/rust#54949
* rkyv/rkyv#409
* rust-lang/rust#54341
In C and C++, on x86_64 Linux,
alignof(__int128)
is equal to16
. However, in Rust,align_of::<u128>()
is equal to8
.C++: https://gcc.godbolt.org/z/YAq1XC
Rust: https://gcc.godbolt.org/z/QvZeqK
This will cause subtle UB if you ever try to use
i128
s across FFI boundaries; for example:C++: https://gcc.godbolt.org/z/PrtHlp
Rust: https://gcc.godbolt.org/z/_SdVqD
The text was updated successfully, but these errors were encountered: