-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
ICE: polonius loan scopes differ from NLL borrow scopes,
#127628
Labels
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
NLL-polonius
Issues related for using Polonius in the borrow checker
S-bug-has-test
Status: This bug is tracked inside the repo by a `known-bug` test.
S-has-mcve
Status: A Minimal Complete and Verifiable Example has been found for this issue
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Jan 17, 2025
…kh726 Location-sensitive polonius prototype: endgame This PR sets up the naive location-sensitive analysis end-to-end, and replaces the location-insensitive analysis. It's roughly all the in-progress work I wanted to land for the prototype, modulo cleanups I still want to do after the holidays, or the polonius debugger, and so on. Here, we traverse the localized constraint graph, have to deal with kills and time-traveling (👌), and record that as loan liveness for the existing scope and active loans computations. Then the near future looks like this, especially if the 2025h1 project goal is accepted: - gradually bringing it up to completion - analyzing and fixing the few remaining test failures - going over the *numerous* fixmes in this prototype (one of which is similar to a hang on one test's millions and millions of constraints) - trying to see how to lower the impact of the lack of NLL liveness optimization on diagnostics, and their categorization of local variables and temporaries (the vast majority of blessed expectations differences), as well as the couple ICEs trying to find an NLL constraint to blame for errors. - dealing with the theoretical weakness around kills, conflating reachability for the two TCS, etc that is described ad nauseam in the code. - switching the compare mode to the in-tree implementation, and blessing the diagnostics - apart from the hang, it's not catastrophically slower on our test suite, so then we can try to enable it on CI - checking crater, maybe trying to make it faster :3, etc. I've tried to gradually introduce this PR's work over 4 commits, because it's kind of subtle/annoying, and Niko/I are not completely convinced yet. That one comment explaining the situation is maybe 30% of the PR 😓. Who knew that spacetime reachability and time-traveling could be mind bending. I kinda found this late and the impact on this part of the computation was a bit unexpected to us. A bit more care/thought will be needed here. I've described my plan in the comments though. In any case, I believe we have the current implementation is a conservative approximation that shouldn't result in unsoundness but false positives at worst. So it feels fine for now. r? `@jackh726` --- Fixes rust-lang#127628 -- which was a assertion triggered for a difference in loan computation between NLLs and the location-insensitive analysis. That doesn't exist anymore so I've removed this crash test.
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Jan 17, 2025
Rollup merge of rust-lang#134980 - lqd:polonius-next-episode-7, r=jackh726 Location-sensitive polonius prototype: endgame This PR sets up the naive location-sensitive analysis end-to-end, and replaces the location-insensitive analysis. It's roughly all the in-progress work I wanted to land for the prototype, modulo cleanups I still want to do after the holidays, or the polonius debugger, and so on. Here, we traverse the localized constraint graph, have to deal with kills and time-traveling (👌), and record that as loan liveness for the existing scope and active loans computations. Then the near future looks like this, especially if the 2025h1 project goal is accepted: - gradually bringing it up to completion - analyzing and fixing the few remaining test failures - going over the *numerous* fixmes in this prototype (one of which is similar to a hang on one test's millions and millions of constraints) - trying to see how to lower the impact of the lack of NLL liveness optimization on diagnostics, and their categorization of local variables and temporaries (the vast majority of blessed expectations differences), as well as the couple ICEs trying to find an NLL constraint to blame for errors. - dealing with the theoretical weakness around kills, conflating reachability for the two TCS, etc that is described ad nauseam in the code. - switching the compare mode to the in-tree implementation, and blessing the diagnostics - apart from the hang, it's not catastrophically slower on our test suite, so then we can try to enable it on CI - checking crater, maybe trying to make it faster :3, etc. I've tried to gradually introduce this PR's work over 4 commits, because it's kind of subtle/annoying, and Niko/I are not completely convinced yet. That one comment explaining the situation is maybe 30% of the PR 😓. Who knew that spacetime reachability and time-traveling could be mind bending. I kinda found this late and the impact on this part of the computation was a bit unexpected to us. A bit more care/thought will be needed here. I've described my plan in the comments though. In any case, I believe we have the current implementation is a conservative approximation that shouldn't result in unsoundness but false positives at worst. So it feels fine for now. r? ``@jackh726`` --- Fixes rust-lang#127628 -- which was a assertion triggered for a difference in loan computation between NLLs and the location-insensitive analysis. That doesn't exist anymore so I've removed this crash test.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
NLL-polonius
Issues related for using Polonius in the borrow checker
S-bug-has-test
Status: This bug is tracked inside the repo by a `known-bug` test.
S-has-mcve
Status: A Minimal Complete and Verifiable Example has been found for this issue
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
auto-reduced (treereduce-rust):
original:
Version information
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc -Zpolonius=next
Program output
The text was updated successfully, but these errors were encountered: