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

ICE on recursive struct #62838

Closed
sgrif opened this issue Jul 20, 2019 · 9 comments
Closed

ICE on recursive struct #62838

sgrif opened this issue Jul 20, 2019 · 9 comments
Labels
C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-medium Medium priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@sgrif
Copy link
Contributor

sgrif commented Jul 20, 2019

repro code:

https://gist.github.com/sgrif/959bb5f820a0c9a616f569ea2195ff7c

Expression on line 68 should be Box<Expression>, introducing the indirection fixes the ICE. I haven't attempted to reduce beyond this example.

rustc 1.36.0 (a53f9df32 2019-07-03)

@jonas-schievink jonas-schievink added C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ I-nominated T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 20, 2019
@meithecatte
Copy link
Contributor

The crash seems to involve the incremental compilation mechanism. Triggering the ICE once will "store" it in the target folder, so you need to do a clean build to check whether a modified input still reproduces the bug. I'll try to minimise the example.

@meithecatte
Copy link
Contributor

The bug stopped reproducing on clean builds even though I changed nothing. I'm really confused...

@nikomatsakis
Copy link
Contributor

Checking in from the compiler team:

Is this a regression? I'm going to mark as P-medium as it seems to be "just an ICE" at this point.

@nikomatsakis nikomatsakis added P-medium Medium priority and removed I-nominated labels Jul 25, 2019
@nikomatsakis
Copy link
Contributor

Not to say we shouldn't fix it, mind you =) @NieDzejkob thanks for your efforts to minimize!

@sgrif are you still able to reproduce?

@sgrif
Copy link
Contributor Author

sgrif commented Jul 25, 2019

I agree this is "just an ICE", and should be prioritized as such -- especially since the code to reproduce it would fail to compile anyway. I'm not sure what the first version where this occurs is.

I can still reproduce on the latest nightly. I get a more specific compiler error:

error: internal compiler error: src/librustc/dep_graph/graph.rs:722: try_mark_previous_green() - Forcing the DepNode should have set its color

@sgrif
Copy link
Contributor Author

sgrif commented Jul 25, 2019

I will note that I had to change that line to Box<Expression> to get it to compile once, then remove the Box to get the recursive version in order for the ICE to occur

@ackxolotl
Copy link

This might be the same issue as #61323. What do you think?

@hellow554
Copy link
Contributor

This is a dup of #61323 indeed. Thanks for pointing it out @ackxolotl

@sgrif
Copy link
Contributor Author

sgrif commented Aug 14, 2019

Closing as a dupe

@sgrif sgrif closed this as completed Aug 14, 2019
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. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-medium Medium priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants