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

Taint const qualifs if a static is referenced that didn't pass wfcheck #123675

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Apr 9, 2024

It is correct to only check the signature here, as the ICE is caused by USE_WITH_ERROR trying to allocate memory to store the result of WITH_ERROR before evaluating it.

fixes #123153

@rustbot
Copy link
Collaborator

rustbot commented Apr 9, 2024

r? @davidtwco

rustbot has assigned @davidtwco.
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 Apr 9, 2024
Copy link
Member

@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me after nits

Comment on lines 334 to 335
if let Some(def_id) = def_id.as_local() {
if let Err(guar) = self.tcx.at(span).check_well_formed(hir::OwnerId { def_id }) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let-chains

@compiler-errors
Copy link
Member

@rustbot author

@rustbot rustbot 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-review Status: Awaiting review from the assignee but also interested parties. labels Apr 9, 2024
@oli-obk
Copy link
Contributor Author

oli-obk commented Apr 16, 2024

@bors r=compiler-errors

@bors
Copy link
Contributor

bors commented Apr 16, 2024

📌 Commit 55cc02d 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 16, 2024
@rust-log-analyzer

This comment has been minimized.

@oli-obk
Copy link
Contributor Author

oli-obk commented Apr 16, 2024

@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 Apr 16, 2024
@oli-obk
Copy link
Contributor Author

oli-obk commented Apr 16, 2024

@bors r=compiler-errors

@bors
Copy link
Contributor

bors commented Apr 16, 2024

📌 Commit 801413e 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 16, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 17, 2024
…llaumeGomez

Rollup of 7 pull requests

Successful merges:

 - rust-lang#123673 (Don't ICE for kind mismatches during error rendering)
 - rust-lang#123675 (Taint const qualifs if a static is referenced that didn't pass wfcheck)
 - rust-lang#123975 (Port the 2 `rust-lld` run-make tests to `rmake`)
 - rust-lang#124000 (Use `/* value */` as a placeholder)
 - rust-lang#124013 (Box::into_raw: make Miri understand that this is a box-to-raw cast)
 - rust-lang#124027 (Prefer identity equality over equating types during coercion.)
 - rust-lang#124036 (Remove `default_hidden_visibility: false` from wasm targets)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 4885ddf into rust-lang:master Apr 17, 2024
12 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Apr 17, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 17, 2024
Rollup merge of rust-lang#123675 - oli-obk:static_wf_ice, r=compiler-errors

Taint const qualifs if a static is referenced that didn't pass wfcheck

It is correct to only check the signature here, as the ICE is caused by `USE_WITH_ERROR` trying to allocate memory to store the result of `WITH_ERROR` before evaluating it.

fixes rust-lang#123153
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
Status: Done
Development

Successfully merging this pull request may close these issues.

ICE: write_immediate_to_mplace: invalid Scalar layout: TyAndLayout{ ...
7 participants