-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
crater: assert_eq!(NLL, location-insensitive polonius); #117593
Conversation
@bors try |
crater: assert_eq!(NLL, location-insensitive polonius); Crater run to check `-Zpolonius=next`. Any differences in how NLLs and location-insensitive polonius compute scopes will cause an assert to trip and an ICE. Depends on rust-lang#117560 to fix the last known fuzzing example where there was such a difference. r? `@ghost`
☀️ Try build successful - checks-actions |
@craterbot check |
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🎉 Experiment
|
WIP triage until I can properly dedupe the root causes:
Some hacky and quick deduplication on crates with loan differences: |
Liveness data is pushed from multiple parts of NLL. Instead of changing the call sites to maintain live loans, move the latter to `LivenessValues` where this liveness data is pushed to, and maintain live loans there. This fixes the differences in polonius scopes on some CFGs where a variable was dead in tracing but as a MIR terminator its regions were marked live from "constraint generation"
I've minimized 6 of the crudely deduped regressions, and they all looked similar to me. I've pushed a commit fixing these liveness differences and it's likely it will fix the other affected crates as well. Let's try it on crater then. @bors try |
crater: assert_eq!(NLL, location-insensitive polonius); Crater run to check `-Zpolonius=next`. Any differences in how NLLs and location-insensitive polonius compute scopes will cause an assert to trip and an ICE. Depends on rust-lang#117560 to fix the last known fuzzing example where there was such a difference. r? `@ghost`
☀️ Try build successful - checks-actions |
Short run, and will also filter out the disk space related issues. @craterbot check p=1 crates=https://crater-reports.s3.amazonaws.com/pr-117593/retry-regressed-list.txt |
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🎉 Experiment
|
sweet |
Centralize live loans maintenance to fix scope differences due to liveness As found in the recent [polonius crater run](rust-lang#117593 (comment)), NLLs and the location-insensitive polonius computed different scopes on some specific CFG shapes, e.g. the following. ![image](https://github.com/rust-lang/rust/assets/247183/c3649f5e-3058-454e-854e-1a6b336bdd5e) I had missed that liveness data was pushed from different sources than just the liveness computation: there are a few places that do this -- and some of them may be unneeded or at the very least untested, as no tests changed when I tried removing some of them. Here, `_6` is e.g. dead on entry to `bb2[0]` during `liveness::trace`, but its regions will be marked as live later during "constraint generation" (which I plan to refactor away and put in the liveness module soon). This should cause the inflowing loans to be marked live, but they were only computed in `liveness::trace`. Therefore, this PR moves live loan maintenance to `LivenessValues`, so that the various places pushing liveness data will all also update live loans at the same time -- except for promoteds which I don't believe need them, and their liveness handling is already interesting/peculiar. All the regressions I saw in the initial crater run were related to this kind of shapes, and this change did fix all of them on the [next run](rust-lang#117593 (comment)). r? `@matthewjasper` (This will conflict with rust-lang#117880 but whichever lands first is fine by me, the end goal is the same for both)
Crater run to check
-Zpolonius=next
. Any differences in how NLLs and location-insensitive polonius compute scopes will cause an assert to trip and an ICE.r? @ghost