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

will_wake tests fail on Miri and that is expected #122016

Merged
merged 1 commit into from
Mar 6, 2024

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Mar 5, 2024

Follow-up to #121622
r? @cuviper @dtolnay

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Mar 5, 2024
Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

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

Thank you!

If I wanted to try to make this test pass in Miri, does something along the lines of c4c5b3d seem promising? This was the original draft of #121622. Maybe the right fix involves making both changes.

@dtolnay
Copy link
Member

dtolnay commented Mar 5, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Mar 5, 2024

📌 Commit 960dd38 has been approved by dtolnay

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 Mar 5, 2024
@dtolnay dtolnay assigned dtolnay and unassigned cuviper Mar 5, 2024
@RalfJung
Copy link
Member Author

RalfJung commented Mar 5, 2024

If I wanted to try to make this test pass in Miri, does something along the lines of c4c5b3d seem promising? This was the original draft of #121622. Maybe the right fix involves making both changes.

I don't think this would help. Rust never makes any guarantees about the address identity of promoteds, and so neither does Miri. The only globals with address identity guarantees are static. I think it's pretty fundamental that for constants that involve generics, duplication can happen, due to how we do codegen: two crates could independently use the global at the same type, and they would each get their own copy as they can't know about each other. Then later they get linked together and the linker may or may not deduplicate.

@dtolnay
Copy link
Member

dtolnay commented Mar 5, 2024

Good call. Then this calls for a language feature. static VTABLE<W: Wake + Send + Sync + 'static>: RawWakerVTable = ...

@RalfJung
Copy link
Member Author

RalfJung commented Mar 5, 2024

Generic statics are requested every now and then but to my knowledge, so far nobody was able to find a credible implementation strategy. The problems I mentioned with how we do codegen still apply. See here for a recent incarnation of this discussion.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 5, 2024
will_wake tests fail on Miri and that is expected

Follow-up to rust-lang#121622
r? `@cuviper` `@dtolnay`
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 5, 2024
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#121280 (Implement MaybeUninit::fill{,_with,_from})
 - rust-lang#121438 (std support for wasm32 panic=unwind)
 - rust-lang#121658 (Hint user to update nightly on ICEs produced from outdated nightly)
 - rust-lang#121959 (Removing absolute path in proc-macro)
 - rust-lang#121961 (add test for rust-lang#78894 rust-lang#71450)
 - rust-lang#121975 (hir_analysis: enums return `None` in `find_field`)
 - rust-lang#121978 (Fix duplicated path in the "not found dylib" error)
 - rust-lang#121991 (Merge impl_trait_in_assoc_types_defined_by query back into `opaque_types_defined_by`)
 - rust-lang#122016 (will_wake tests fail on Miri and that is expected)
 - rust-lang#122018 (only set noalias on Box with the global allocator)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 5, 2024
will_wake tests fail on Miri and that is expected

Follow-up to rust-lang#121622
r? ``@cuviper`` ``@dtolnay``
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 5, 2024
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#121065 (Add basic i18n guidance for `Display`)
 - rust-lang#121744 (Stop using Bubble in coherence and instead emulate it with an intercrate check)
 - rust-lang#121829 (Dummy tweaks (attempt 2))
 - rust-lang#121832 (Add new Tier-3 target: `loongarch64-unknown-linux-musl`)
 - rust-lang#121857 (Implement async closure signature deduction)
 - rust-lang#121894 (const_eval_select: make it safe but be careful with what we expose on stable for now)
 - rust-lang#122014 (Change some attributes to only_local.)
 - rust-lang#122016 (will_wake tests fail on Miri and that is expected)
 - rust-lang#122018 (only set noalias on Box with the global allocator)
 - rust-lang#122028 (Remove some dead code)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 5, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#121065 (Add basic i18n guidance for `Display`)
 - rust-lang#121744 (Stop using Bubble in coherence and instead emulate it with an intercrate check)
 - rust-lang#121829 (Dummy tweaks (attempt 2))
 - rust-lang#121857 (Implement async closure signature deduction)
 - rust-lang#121894 (const_eval_select: make it safe but be careful with what we expose on stable for now)
 - rust-lang#122014 (Change some attributes to only_local.)
 - rust-lang#122016 (will_wake tests fail on Miri and that is expected)
 - rust-lang#122018 (only set noalias on Box with the global allocator)
 - rust-lang#122028 (Remove some dead code)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 6, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#121065 (Add basic i18n guidance for `Display`)
 - rust-lang#121744 (Stop using Bubble in coherence and instead emulate it with an intercrate check)
 - rust-lang#121829 (Dummy tweaks (attempt 2))
 - rust-lang#121857 (Implement async closure signature deduction)
 - rust-lang#121894 (const_eval_select: make it safe but be careful with what we expose on stable for now)
 - rust-lang#122014 (Change some attributes to only_local.)
 - rust-lang#122016 (will_wake tests fail on Miri and that is expected)
 - rust-lang#122018 (only set noalias on Box with the global allocator)
 - rust-lang#122028 (Remove some dead code)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 0760433 into rust-lang:master Mar 6, 2024
11 checks passed
@rustbot rustbot added this to the 1.78.0 milestone Mar 6, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 6, 2024
Rollup merge of rust-lang#122016 - RalfJung:will_wake, r=dtolnay

will_wake tests fail on Miri and that is expected

Follow-up to rust-lang#121622
r? ```@cuviper``` ```@dtolnay```
@RalfJung RalfJung deleted the will_wake branch March 6, 2024 07:07
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-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants