-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Deferred ICEs (i.e. delay_span_bug) are not preserved by incremental. #65401
Comments
It looks like without incremental we output artifacts (like |
Nominating and proposing P-high (mostly because of potential annoyance factor). This should possibly also be labeled I-unsound under the assumption that under the general case of this issue, we might produce artifacts under subsequent runs that may produce UB traces. (However, it is probable that the user will notice the ICE at some other point in time and therefore discard the artifact.) |
The current expected behavior of the compiler is to not save any incremental state if an error occurs. |
@michaelwoerister In that case, it seems to me like it's a matter of recording the fact that we did a |
Yep, the following check should also take rust/src/librustc_incremental/persist/fs.rs Line 310 in cf048cc
While we are at it, we could also add a similar check to
|
I'd like to start contributing to rustc and I wanted to ask if this is a good issue to start on (I have read the rustc book) |
@traxys Sure, this is a decently good issue to start on and should be pretty interesting in terms of learning the infrastructure. If you get stuck, need help, and want to talk synchronously you can hop into https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/.2365401.20delay_span_bug.20not.20preserved.20by.20incremental and we'll try to help out. |
#65470 fixes this issue. It would still be good to have a test case for it. |
I have started to write the code making this test possible, I'll open a PR shortly |
Making ICEs and test them in incremental This adds: - A way to make the compiler ICE - A way to check for ICE in `cfail` tests with `should-ice` - A regression test for issue rust-lang#65401 I am not sure the attribute added `should-ice` is the best for this job
When compiling a
delay_span_bug
testcase (e.g. the last snippet in #63154 (comment) on the current nightly, or any of the other examples in that issue on older compilers) with-Cincremental
(or Cargo which does that by default), only the initial run will ICE.Subsequent runs will succeed without an ICE, in the absence of any regular errors. However, changing the relevant code (e.g. adding a space) can cause the query that calls
delay_span_bug
to be recomputed and bring the ICE back.IIUC, incremental compilation stores diagnostics and replays them on subsequent runs, but that appears to not apply to
delay_span_bug
ICEs.cc @michaelwoerister
The text was updated successfully, but these errors were encountered: