Skip to content

rustc stack overflow on type of infinite size. #11464

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

Closed
koute opened this issue Jan 11, 2014 · 3 comments
Closed

rustc stack overflow on type of infinite size. #11464

koute opened this issue Jan 11, 2014 · 3 comments

Comments

@koute
Copy link
Member

koute commented Jan 11, 2014

struct Foo { x: Option<Foo> }
fn main() { ~Foo { x: None }; }

results in:

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

rustc 0.9 (ff7ecca 2014-01-10 08:26:24 -0800), GNU/Linux x86_64

@pnkfelix
Copy link
Member

Wild guess: Is the fix for #742 specific to enums alone, and needs to be generalized to cover structs too?

@pnkfelix
Copy link
Member

mm looks like a likely dupe of #4218 (and I guess #4363 though the similarities are a bit more obscured there).

@alexcrichton
Copy link
Member

Closing as a dupe of #4363 (I think we're hanging most "recursive struct causes stack overflow" bugs off of that one

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

3 participants