-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure all packed structs are also repr(C)
Using #[repr(packed)] alone does not guarantee that the struct fields will stay in the specified order, and as of a change in Rust 1.80, the compiler will actually reorder such structs in practice in some cases: <rust-lang/rust#125360> Add "C" to all structs that were previously #[repr(packed)] alone, since these are all trying to match an externally-defined layout where order matters. None of these would get reordered in practice today, even with the Rust 1.80 change, but this ensures they will always stay consistent. Change-Id: I397fd0bd531a34e0f1726afb830bcd7fcc6a2f05 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5758933 Commit-Queue: Daniel Verkamp <dverkamp@chromium.org> Reviewed-by: Frederick Mayle <fmayle@google.com>
- Loading branch information
1 parent
34ed5bc
commit 5d028ab
Showing
3 changed files
with
13 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters