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

task 'rustc' has overflowed its stack when compiling cyclic structs and enums #13632

Closed
ryantm opened this issue Apr 19, 2014 · 1 comment
Closed

Comments

@ryantm
Copy link
Contributor

ryantm commented Apr 19, 2014

This code produces a stack overflow in rustc when compiled:

pub struct A {
    b: Option<B>
}

pub struct B {
    a: Option<A>
}

pub enum C {
    D(B)
}

fn main () {}

Output:

$ rustc main.rs 
task 'rustc' has overflowed its stack
Illegal instruction (core dumped)

My environment:

$ rustc -v
rustc 0.11-pre-nightly (d35804e 2014-04-18 00:01:22 -0700)
host: x86_64-unknown-linux-gnu
$ uname -a
Linux hostname 3.14.1-1-ARCH #1 SMP PREEMPT Mon Apr 14 20:40:47 CEST 2014 x86_64 GNU/Linux
@alexcrichton
Copy link
Member

Closing as a dupe of #4363, but thanks for the report!

Manishearth pushed a commit to Manishearth/rust that referenced this issue Nov 23, 2022
Make it more obvious which SCIP features we do not yet emit in code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants