-
Notifications
You must be signed in to change notification settings - Fork 736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix union layout when it contains 0 sized array. #3173
Merged
Merged
Conversation
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
r? @emilio |
bherrera
pushed a commit
to misttech/fuchsia
that referenced
this pull request
Apr 1, 2025
This CL 1) updates the outputs of generate.py so that they match what the script does at ToT (outputs such as arm.rs at ToT haven't been updated/synced), and 2) makes sure fx build works after the update. Steps: 1. Run `./src/starnix/lib/linux_uapi/generate.py` (no edits) This results in some changes, notably, io_uring_sqe__bindgen_ty_6 updating to a struct and having 5 params. 2. Run `fx build`. This fails due to: ``` error[E0080]: evaluation of `std::mem::size_of::<io_uring_sqe>` failed --> /b/s/w/ir/x/w/fuchsia-third_party-rust/library/core/src/mem/mod.rs:1229:26 | = note: values of the type `[u8; 18446744073709551608]` are too big for the target architecture ``` This is rust-lang/rust-bindgen#3068. 3. Patch in the generate.py edit. Run `./src/starnix/lib/linux_uapi/generate.py` (with edit). Note that generated files now do not have the `pub __bindgen_padding_0` line. 4. `fx build` completes. Once's qsr's fix at rust-lang/rust-bindgen#3173 is merged and rolled in, we shouldn't need to do the regex replace. Bug: 398914504 Change-Id: Ic6be5a14f4f00477795588a5ed52e5770c64955e Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1235157 Reviewed-by: Benjamin Lerman <[email protected]> Commit-Queue: Mary Xia <[email protected]>
bherrera
pushed a commit
to misttech/integration
that referenced
this pull request
Apr 3, 2025
…_padding_0 This CL 1) updates the outputs of generate.py so that they match what the script does at ToT (outputs such as arm.rs at ToT haven't been updated/synced), and 2) makes sure fx build works after the update. Steps: 1. Run `./src/starnix/lib/linux_uapi/generate.py` (no edits) This results in some changes, notably, io_uring_sqe__bindgen_ty_6 updating to a struct and having 5 params. 2. Run `fx build`. This fails due to: ``` error[E0080]: evaluation of `std::mem::size_of::<io_uring_sqe>` failed --> /b/s/w/ir/x/w/fuchsia-third_party-rust/library/core/src/mem/mod.rs:1229:26 | = note: values of the type `[u8; 18446744073709551608]` are too big for the target architecture ``` This is rust-lang/rust-bindgen#3068. 3. Patch in the generate.py edit. Run `./src/starnix/lib/linux_uapi/generate.py` (with edit). Note that generated files now do not have the `pub __bindgen_padding_0` line. 4. `fx build` completes. Once's qsr's fix at rust-lang/rust-bindgen#3173 is merged and rolled in, we shouldn't need to do the regex replace. Original-Bug: 398914504 Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1235157 Original-Revision: 3b130710ba6aac0d9130bc718184bfaf34abbfa8 GitOrigin-RevId: c1e0371e35ebae79d27ecaaac3fc16ae30461a38 Change-Id: I4169f94aa0c01a8be2ddcddb6b094e46b6c7108d
emilio
approved these changes
Apr 4, 2025
@ojeda the rust for linux CI seems failing:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #3068