-
Notifications
You must be signed in to change notification settings - Fork 13k
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
-Zdump-mir
introduces cycle in static containing static reference
#134205
Labels
-Zdump-mir
Unstable option: -Zdump-mir
C-bug
Category: This is a bug.
I-cycle
Issue: A query cycle occurred while none was expected
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
dtolnay
added
C-bug
Category: This is a bug.
I-cycle
Issue: A query cycle occurred while none was expected
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Dec 12, 2024
rustbot
added
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Dec 12, 2024
jieyouxu
added
-Zdump-mir
Unstable option: -Zdump-mir
and removed
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
labels
Dec 12, 2024
cc @RalfJung, I think we probably shouldn't be printing the allocations of statics when dumping MIR (which requires computing the CTFE MIR so they can actually be evaluated), or at least we shouldn't be doing it until after optimized-mir is computed and not during the query itself. |
Cc @oli-obk |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Jan 13, 2025
…ler-errors Fix cycle error only occurring with -Zdump-mir fixes rust-lang#134205 During mir dumping, we evaluate static items to render their allocations. If a static item refers to itself, its own MIR will have a reference to itself, so during mir dumping we end up evaluating the static again, causing us to try to build MIR again (mir dumping happens during MIR building). Thus I disabled evaluation of statics during MIR dumps in case the MIR body isn't far enough along yet to be able to be guaranteed cycle free.
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Jan 13, 2025
…ler-errors Fix cycle error only occurring with -Zdump-mir fixes rust-lang#134205 During mir dumping, we evaluate static items to render their allocations. If a static item refers to itself, its own MIR will have a reference to itself, so during mir dumping we end up evaluating the static again, causing us to try to build MIR again (mir dumping happens during MIR building). Thus I disabled evaluation of statics during MIR dumps in case the MIR body isn't far enough along yet to be able to be guaranteed cycle free.
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Jan 14, 2025
Rollup merge of rust-lang#134498 - oli-obk:push-wmxynprsyxvr, r=compiler-errors Fix cycle error only occurring with -Zdump-mir fixes rust-lang#134205 During mir dumping, we evaluate static items to render their allocations. If a static item refers to itself, its own MIR will have a reference to itself, so during mir dumping we end up evaluating the static again, causing us to try to build MIR again (mir dumping happens during MIR building). Thus I disabled evaluation of statics during MIR dumps in case the MIR body isn't far enough along yet to be able to be guaranteed cycle free.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
-Zdump-mir
Unstable option: -Zdump-mir
C-bug
Category: This is a bug.
I-cycle
Issue: A query cycle occurred while none was expected
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The error does not occur if you build without
-Zdump-mir
first.Meta
The text was updated successfully, but these errors were encountered: