Skip to content
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

Don't inline tainted MIR bodies #128616

Merged
merged 1 commit into from
Aug 9, 2024

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Aug 3, 2024

Don't inline MIR bodies that are tainted, since they're not necessarily well-formed.

Fixes #128601 (I didn't add a new test, just copied one from the crashes, since they're the same root cause).
Fixes #122909.

@rustbot
Copy link
Collaborator

rustbot commented Aug 3, 2024

r? @wesleywiser

rustbot has assigned @wesleywiser.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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 3, 2024
@rustbot
Copy link
Collaborator

rustbot commented Aug 3, 2024

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@compiler-errors
Copy link
Member Author

r? cjgillot

@matthiaskrgr
Copy link
Member

also fixes #122909 ?

@bors
Copy link
Contributor

bors commented Aug 8, 2024

☔ The latest upstream changes (presumably #128835) made this pull request unmergeable. Please resolve the merge conflicts.

@cjgillot
Copy link
Contributor

cjgillot commented Aug 9, 2024

R=me after rebase

@compiler-errors
Copy link
Member Author

@bors r=cjgillot

@bors
Copy link
Contributor

bors commented Aug 9, 2024

📌 Commit 65b029b has been approved by cjgillot

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 9, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 9, 2024
…iaskrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#128616 (Don't inline tainted MIR bodies)
 - rust-lang#128804 (run-make: enable msvc for redundant-libs)
 - rust-lang#128823 (run-make: enable msvc for staticlib-dylib-linkage)
 - rust-lang#128824 (Update compiler-builtins version to 0.1.118)

Failed merges:

 - rust-lang#128410 (Migrate `remap-path-prefix-dwarf` `run-make` test to rmake)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 7485f8b into rust-lang:master Aug 9, 2024
6 checks passed
@rustbot rustbot added this to the 1.82.0 milestone Aug 9, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Aug 9, 2024
Rollup merge of rust-lang#128616 - compiler-errors:mir-inline-tainted, r=cjgillot

Don't inline tainted MIR bodies

Don't inline MIR bodies that are tainted, since they're not necessarily well-formed.

Fixes rust-lang#128601 (I didn't add a new test, just copied one from the crashes, since they're the same root cause).
Fixes rust-lang#122909.
@rvolgers
Copy link

rvolgers commented Aug 9, 2024

This is perhaps a dumb question, but why are any optimizations performed at all when errors are present?

@compiler-errors
Copy link
Member Author

When all errors are present? Because we don't want global state to affect local computations, iirc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

ICE: mentioned_items for DefId(..) have not yet been set ICE: Closure arguments are not passed as a tuple
7 participants