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

#[used] statics in the local crate are not found #3722

Closed
RalfJung opened this issue Jun 29, 2024 · 0 comments · Fixed by #3723
Closed

#[used] statics in the local crate are not found #3722

RalfJung opened this issue Jun 29, 2024 · 0 comments · Fixed by #3723

Comments

@RalfJung
Copy link
Member

See the test that got removed in rust-lang/rust#127099: "used" statics in the local crate of a binary are not considered "reachable" by rustc, and so Miri can't find them. This means we fail to run all the thread callbacks on Windows.

Since apparently rustc relies on these truly being considered unreachable, we need to find a different way -- likely be directly iterating all HIR items ourselves, instead of relying on the reachable query.

@bors bors closed this as completed in 72b4d8c Jun 29, 2024
RalfJung pushed a commit to RalfJung/rust that referenced this issue Jun 29, 2024
iter_exported_symbols: also walk used statics in local crate

Since rust-lang#126938 got reverted, we need a different approach.

Fixes rust-lang/miri#3722
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant