-
Notifications
You must be signed in to change notification settings - Fork 13k
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
ABI compat check: detect unadjusted ABI mismatches #129649
Conversation
rustbot has assigned @petrochenkov. Use |
These commits modify compiler targets. |
// That elevates any type difference to an ABI difference since we just use the | ||
// full Rust type as the LLVM argument/return type. | ||
if matches!(self.mode, PassMode::Direct(..)) | ||
&& matches!(self.layout.abi, Abi::Aggregate { .. }) |
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.
Are these PassMode::Direct
concerns irrelevant for non-aggregates?
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.
Yes -- for non-aggregates, codegen uses the layout.abi
information to compute how the argument should be passed, which has already been checked to be sufficiently compatible. It is only with Aggregate
that the underlying Rust type "leaks through".
This looks reasonable to me, but I may be missing some of the necessary context. |
@bors r=petrochenkov rollup |
…r=petrochenkov ABI compat check: detect unadjusted ABI mismatches
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#129401 (Partially stabilize `feature(new_uninit)`) - rust-lang#129581 (exit: explain our expectations for the exit handlers registered in a Rust program) - rust-lang#129634 (Fix tidy to allow `edition = "2024"` in `Cargo.toml`) - rust-lang#129635 (Use unsafe extern blocks throughout the compiler) - rust-lang#129645 (Fix typos in floating-point primitive type docs) - rust-lang#129648 (More `unreachable_pub`) - rust-lang#129649 (ABI compat check: detect unadjusted ABI mismatches) - rust-lang#129652 (fix Pointer to reference conversion docs) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#129507 (make it possible to enable const_precise_live_drops per-function) - rust-lang#129581 (exit: explain our expectations for the exit handlers registered in a Rust program) - rust-lang#129634 (Fix tidy to allow `edition = "2024"` in `Cargo.toml`) - rust-lang#129635 (Use unsafe extern blocks throughout the compiler) - rust-lang#129645 (Fix typos in floating-point primitive type docs) - rust-lang#129648 (More `unreachable_pub`) - rust-lang#129649 (ABI compat check: detect unadjusted ABI mismatches) - rust-lang#129652 (fix Pointer to reference conversion docs) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#129507 (make it possible to enable const_precise_live_drops per-function) - rust-lang#129581 (exit: explain our expectations for the exit handlers registered in a Rust program) - rust-lang#129634 (Fix tidy to allow `edition = "2024"` in `Cargo.toml`) - rust-lang#129635 (Use unsafe extern blocks throughout the compiler) - rust-lang#129645 (Fix typos in floating-point primitive type docs) - rust-lang#129648 (More `unreachable_pub`) - rust-lang#129649 (ABI compat check: detect unadjusted ABI mismatches) - rust-lang#129652 (fix Pointer to reference conversion docs) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#129649 - RalfJung:unadjusted-abi-mismatch, r=petrochenkov ABI compat check: detect unadjusted ABI mismatches
No description provided.