interpret: make validate_c_variadic_compatible_ty public - #161615
Merged
Conversation
Collaborator
folkertdev
approved these changes
Aug 23, 2026
Comment on lines
-832
to
-840
| // Types of different sizes can never be compatible. | ||
| if arg_mplace.layout.size != callee_type.size { | ||
| throw_ub_format!( | ||
| "va_arg type mismatch: requested `{}` is incompatible with next argument of type `{}`", | ||
| callee_ty, | ||
| caller_ty, | ||
| ) | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
I assume this is removed because it's also checked by validate_c_variadic_compatible_ty which is unconditionally called right below?
Contributor
|
@bors r+ rollup |
Contributor
Zalathar
added a commit
to Zalathar/rust
that referenced
this pull request
Aug 24, 2026
interpret: make validate_c_variadic_compatible_ty public Miri needs the same check for vararg shims, so let's make this function public so that Miri can reuse it. r? @saethlin or @folkertdev
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 24, 2026
Rollup of 24 pull requests Successful merges: - #161586 (miri subtree update) - #161187 (add `Complex<T>` layout tests for straightforward targets) - #161524 (Put back `tests/rustdoc-gui/search-result-display.goml`) - #161592 (core: refactor tests/pattern.rs tests) - #161602 (Fix flakyness issue for `tests/rustdoc-gui/headers-color.goml`) - #152433 (Use `symlink_dir` to create junctions on Windows instead of trying to use symbolic links in `copy_link_internal`) - #155254 (Recover on attribute in use tree) - #158695 (Replace `CrateDump` with the Debug impl from `CStore`) - #159456 (Fix the reporting of layout normalization failures in transmute checks) - #159940 (Eliminate some buggy `unreachable!()`s in `expand_[option_]env()`) - #160452 (-Ctarget-feature is not unsafe (any more)) - #161007 (tests/ui/union/union-nodrop.rs: fix typo "expressios") - #161166 (add crashtests [5/N], remove unused aux files ) - #161294 (add crashtests [6/N]) - #161552 (also trigger overflow FCW when going from overflow -> error) - #161569 (Bump cfg_aliases to 0.2.2) - #161573 (re-bless `pretty-std` on windows) - #161580 (Add codegen test for redundant bit mask after a range check) - #161588 (update eyre) - #161589 (std: reduce visibility of some internal OsStr related types) - #161598 ([Bootstrap] Pass exact CI `llvm-config` executable path) - #161601 (Path: use optimized is_empty() method) - #161604 (coretests: Add a few tests for backward multibyte predicate) - #161615 (interpret: make validate_c_variadic_compatible_ty public)
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 24, 2026
Rollup of 22 pull requests Successful merges: - #161586 (miri subtree update) - #161187 (add `Complex<T>` layout tests for straightforward targets) - #161524 (Put back `tests/rustdoc-gui/search-result-display.goml`) - #161592 (core: refactor tests/pattern.rs tests) - #161602 (Fix flakyness issue for `tests/rustdoc-gui/headers-color.goml`) - #152433 (Use `symlink_dir` to create junctions on Windows instead of trying to use symbolic links in `copy_link_internal`) - #155254 (Recover on attribute in use tree) - #158695 (Replace `CrateDump` with the Debug impl from `CStore`) - #159456 (Fix the reporting of layout normalization failures in transmute checks) - #159940 (Eliminate some buggy `unreachable!()`s in `expand_[option_]env()`) - #160452 (-Ctarget-feature is not unsafe (any more)) - #161007 (tests/ui/union/union-nodrop.rs: fix typo "expressios") - #161552 (also trigger overflow FCW when going from overflow -> error) - #161569 (Bump cfg_aliases to 0.2.2) - #161573 (re-bless `pretty-std` on windows) - #161580 (Add codegen test for redundant bit mask after a range check) - #161588 (update eyre) - #161589 (std: reduce visibility of some internal OsStr related types) - #161598 ([Bootstrap] Pass exact CI `llvm-config` executable path) - #161601 (Path: use optimized is_empty() method) - #161604 (coretests: Add a few tests for backward multibyte predicate) - #161615 (interpret: make validate_c_variadic_compatible_ty public)
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 24, 2026
Rollup merge of #161615 - RalfJung:vararg-check, r=folkertdev interpret: make validate_c_variadic_compatible_ty public Miri needs the same check for vararg shims, so let's make this function public so that Miri can reuse it. r? @saethlin or @folkertdev
RalfJung
pushed a commit
to RalfJung/miri
that referenced
this pull request
Aug 24, 2026
Rollup of 22 pull requests Successful merges: - rust-lang/rust#161586 (miri subtree update) - rust-lang/rust#161187 (add `Complex<T>` layout tests for straightforward targets) - rust-lang/rust#161524 (Put back `tests/rustdoc-gui/search-result-display.goml`) - rust-lang/rust#161592 (core: refactor tests/pattern.rs tests) - rust-lang/rust#161602 (Fix flakyness issue for `tests/rustdoc-gui/headers-color.goml`) - rust-lang/rust#152433 (Use `symlink_dir` to create junctions on Windows instead of trying to use symbolic links in `copy_link_internal`) - rust-lang/rust#155254 (Recover on attribute in use tree) - rust-lang/rust#158695 (Replace `CrateDump` with the Debug impl from `CStore`) - rust-lang/rust#159456 (Fix the reporting of layout normalization failures in transmute checks) - rust-lang/rust#159940 (Eliminate some buggy `unreachable!()`s in `expand_[option_]env()`) - rust-lang/rust#160452 (-Ctarget-feature is not unsafe (any more)) - rust-lang/rust#161007 (tests/ui/union/union-nodrop.rs: fix typo "expressios") - rust-lang/rust#161552 (also trigger overflow FCW when going from overflow -> error) - rust-lang/rust#161569 (Bump cfg_aliases to 0.2.2) - rust-lang/rust#161573 (re-bless `pretty-std` on windows) - rust-lang/rust#161580 (Add codegen test for redundant bit mask after a range check) - rust-lang/rust#161588 (update eyre) - rust-lang/rust#161589 (std: reduce visibility of some internal OsStr related types) - rust-lang/rust#161598 ([Bootstrap] Pass exact CI `llvm-config` executable path) - rust-lang/rust#161601 (Path: use optimized is_empty() method) - rust-lang/rust#161604 (coretests: Add a few tests for backward multibyte predicate) - rust-lang/rust#161615 (interpret: make validate_c_variadic_compatible_ty public)
flip1995
pushed a commit
to flip1995/rust-clippy
that referenced
this pull request
Aug 28, 2026
Rollup of 22 pull requests Successful merges: - rust-lang/rust#161586 (miri subtree update) - rust-lang/rust#161187 (add `Complex<T>` layout tests for straightforward targets) - rust-lang/rust#161524 (Put back `tests/rustdoc-gui/search-result-display.goml`) - rust-lang/rust#161592 (core: refactor tests/pattern.rs tests) - rust-lang/rust#161602 (Fix flakyness issue for `tests/rustdoc-gui/headers-color.goml`) - rust-lang/rust#152433 (Use `symlink_dir` to create junctions on Windows instead of trying to use symbolic links in `copy_link_internal`) - rust-lang/rust#155254 (Recover on attribute in use tree) - rust-lang/rust#158695 (Replace `CrateDump` with the Debug impl from `CStore`) - rust-lang/rust#159456 (Fix the reporting of layout normalization failures in transmute checks) - rust-lang/rust#159940 (Eliminate some buggy `unreachable!()`s in `expand_[option_]env()`) - rust-lang/rust#160452 (-Ctarget-feature is not unsafe (any more)) - rust-lang/rust#161007 (tests/ui/union/union-nodrop.rs: fix typo "expressios") - rust-lang/rust#161552 (also trigger overflow FCW when going from overflow -> error) - rust-lang/rust#161569 (Bump cfg_aliases to 0.2.2) - rust-lang/rust#161573 (re-bless `pretty-std` on windows) - rust-lang/rust#161580 (Add codegen test for redundant bit mask after a range check) - rust-lang/rust#161588 (update eyre) - rust-lang/rust#161589 (std: reduce visibility of some internal OsStr related types) - rust-lang/rust#161598 ([Bootstrap] Pass exact CI `llvm-config` executable path) - rust-lang/rust#161601 (Path: use optimized is_empty() method) - rust-lang/rust#161604 (coretests: Add a few tests for backward multibyte predicate) - rust-lang/rust#161615 (interpret: make validate_c_variadic_compatible_ty public)
This file contains hidden or 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
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.
Miri needs the same check for vararg shims, so let's make this function public so that Miri can reuse it.
r? @saethlin or @folkertdev