Skip to content

miri: also detect aliasing of in-place argument and return place #145744

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

Merged
merged 1 commit into from
Aug 24, 2025

Conversation

RalfJung
Copy link
Member

This is a follow-up to #145585 where I forgot to deal with the case of the return place aliasing an in-place argument -- as @Amanieu mentioned in #71117 (comment), that case must also be forbidden.

r? @compiler-errors

@rustbot
Copy link
Collaborator

rustbot commented Aug 22, 2025

compiler-errors is not on the review rotation at the moment.
They may take a while to respond.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 22, 2025
@rustbot
Copy link
Collaborator

rustbot commented Aug 22, 2025

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri

The Miri subtree was changed

cc @rust-lang/miri

@RalfJung RalfJung force-pushed the miri-inplace-aliasing branch from d1faa42 to 381347d Compare August 22, 2025 07:26
@rust-log-analyzer

This comment has been minimized.

@RalfJung RalfJung force-pushed the miri-inplace-aliasing branch from 381347d to 78bdd86 Compare August 22, 2025 08:21
@rustbot
Copy link
Collaborator

rustbot commented Aug 22, 2025

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@compiler-errors
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Aug 23, 2025

📌 Commit 78bdd86 has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 23, 2025
samueltardieu added a commit to samueltardieu/rust that referenced this pull request Aug 23, 2025
…compiler-errors

miri: also detect aliasing of in-place argument and return place

This is a follow-up to rust-lang#145585 where I forgot to deal with the case of the return place aliasing an in-place argument -- as `@Amanieu` mentioned in rust-lang#71117 (comment), that case must also be forbidden.

r? `@compiler-errors`
bors added a commit that referenced this pull request Aug 23, 2025
Rollup of 14 pull requests

Successful merges:

 - #143898 (opt-dist: rebuild rustc when doing static LLVM builds)
 - #144452 (std/sys/fd: Relax `READ_LIMIT` on Darwin)
 - #145234 (match exhaustiveness diagnostics: show a trailing comma on singleton tuple consructors in witness patterns (and clean up a little))
 - #145515 (Optimize `char::encode_utf8`)
 - #145540 (interpret/allocation: get_range on ProvenanceMap)
 - #145670 (port `sanitize` attribute to the new parsing infrastructure)
 - #145713 (next-solver: fix `feature(const_trait_impl)` bootstrap)
 - #145729 (Remove two duplicated crates)
 - #145744 (miri: also detect aliasing of in-place argument and return place)
 - #145774 (Remove default opts from config)
 - #145781 (Remove profile section from Clippy)
 - #145782 (rustdoc: make attributes render consistently)
 - #145787 (citool: cleanup `mismatched_lifetime_syntaxes` warnings)
 - #145791 (Fix ICE when validating transmuting ZST to inhabited enum)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 0b8d7b1 into rust-lang:master Aug 24, 2025
10 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 24, 2025
rust-timer added a commit that referenced this pull request Aug 24, 2025
Rollup merge of #145744 - RalfJung:miri-inplace-aliasing, r=compiler-errors

miri: also detect aliasing of in-place argument and return place

This is a follow-up to #145585 where I forgot to deal with the case of the return place aliasing an in-place argument -- as ``@Amanieu`` mentioned in #71117 (comment), that case must also be forbidden.

r? ``@compiler-errors``
@jhpratt
Copy link
Member

jhpratt commented Aug 24, 2025

still in queue

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 24, 2025
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Aug 24, 2025
Rollup of 14 pull requests

Successful merges:

 - rust-lang/rust#143898 (opt-dist: rebuild rustc when doing static LLVM builds)
 - rust-lang/rust#144452 (std/sys/fd: Relax `READ_LIMIT` on Darwin)
 - rust-lang/rust#145234 (match exhaustiveness diagnostics: show a trailing comma on singleton tuple consructors in witness patterns (and clean up a little))
 - rust-lang/rust#145515 (Optimize `char::encode_utf8`)
 - rust-lang/rust#145540 (interpret/allocation: get_range on ProvenanceMap)
 - rust-lang/rust#145670 (port `sanitize` attribute to the new parsing infrastructure)
 - rust-lang/rust#145713 (next-solver: fix `feature(const_trait_impl)` bootstrap)
 - rust-lang/rust#145729 (Remove two duplicated crates)
 - rust-lang/rust#145744 (miri: also detect aliasing of in-place argument and return place)
 - rust-lang/rust#145774 (Remove default opts from config)
 - rust-lang/rust#145781 (Remove profile section from Clippy)
 - rust-lang/rust#145782 (rustdoc: make attributes render consistently)
 - rust-lang/rust#145787 (citool: cleanup `mismatched_lifetime_syntaxes` warnings)
 - rust-lang/rust#145791 (Fix ICE when validating transmuting ZST to inhabited enum)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants