-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
rustc_target/riscv: Fix passing of transparent unions with only one non-ZST member #115499
rustc_target/riscv: Fix passing of transparent unions with only one non-ZST member #115499
Conversation
@rustbot label +A-abi +O-riscv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
89a24ca
to
efd4e62
Compare
LGTM but let's get another pair of eyes on it and hopefully someone who knows our process for breaking ABI. This affects r? compiler |
Gonna pass to someone who knows more about ABIs. Sorry for not getting to this sooner. r? @bjorn3 |
…on-ZST member This ensures that `MaybeUninit<T>` has the same ABI as `T` when passed through an `extern "C"` function. Fixes rust-lang#115481.
efd4e62
to
751ecde
Compare
Could you add a codegen test for this to avoid regressing this in the future? |
AFAIK #115372 should cover this for RISC-V and other architectures. (This is actually how the bug was found in the first place.) |
Thanks! @bors r+ |
…llaumeGomez Rollup of 6 pull requests Successful merges: - rust-lang#113383 (style-guide: Add section on bugs, and resolving bugs) - rust-lang#115499 (rustc_target/riscv: Fix passing of transparent unions with only one non-ZST member) - rust-lang#115801 (Detect cycle errors hidden by opaques during monomorphization) - rust-lang#115947 (Custom code classes in docs warning) - rust-lang#115957 (fix mismatched symbols) - rust-lang#115958 (explain mysterious addition in float minimum/maximum) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#115499 - msizanoen1:riscv-fix-transparent-union-abi, r=bjorn3 rustc_target/riscv: Fix passing of transparent unions with only one non-ZST member This ensures that `MaybeUninit<T>` has the same ABI as `T` when passed through an `extern "C"` function. Fixes rust-lang#115481. r? `@RalfJung`
This ensures that
MaybeUninit<T>
has the same ABI asT
when passed through anextern "C"
function.Fixes #115481.
r? @RalfJung