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

rustc 1.26.0 crashes when compiling some programs using impl Trait #50627

Closed
0x0blu opened this issue May 10, 2018 · 2 comments
Closed

rustc 1.26.0 crashes when compiling some programs using impl Trait #50627

0x0blu opened this issue May 10, 2018 · 2 comments

Comments

@0x0blu
Copy link

0x0blu commented May 10, 2018

While testing the new 1.26.0's impl Trait feature, there were some programs that caused rustc to stack overflow without very helpful error message

I tried this code:

use std::fmt::Debug;

fn gen() -> impl PartialOrd + Debug { 1 }

fn main() {
    let a = gen();

    println!("{:?}", a);
}

I expected to see this happen: the program compiles and just prints 1

Instead, this happened: rustc crashed with cryptic error message

Meta

rustc --version --verbose:

rustc 1.26.0 (a77568041 2018-05-07)
binary: rustc
commit-hash: a7756804103447ea4e68a71ccf071e7ad8f7a03e
commit-date: 2018-05-07
host: x86_64-apple-darwin
release: 1.26.0
LLVM version: 6.0

Backtrace:

cargo run --verbose:

   Compiling impl-trait v0.1.0 (file:///Users/blu/Documents/playground/impl-trait)
     Running `rustc --crate-name impl_trait src/main.rs --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=33cb8f6c497adcee -C extra-filename=-33cb8f6c497adcee --out-dir /Users/blu/Documents/playground/impl-trait/target/debug/deps -C incremental=/Users/blu/Documents/playground/impl-trait/target/debug/incremental -L dependency=/Users/blu/Documents/playground/impl-trait/target/debug/deps`

thread 'rustc' has overflowed its stack
fatal runtime error: stack overflow
error: Could not compile `impl-trait`.

Caused by:
  process didn't exit successfully: `rustc --crate-name impl_trait src/main.rs --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=33cb8f6c497adcee -C extra-filename=-33cb8f6c497adcee --out-dir /Users/blu/Documents/playground/impl-trait/target/debug/deps -C incremental=/Users/blu/Documents/playground/impl-trait/target/debug/incremental -L dependency=/Users/blu/Documents/playground/impl-trait/target/debug/deps` (signal: 6, SIGABRT: process abort signal)
@0x0blu 0x0blu changed the title rustc 1.26.0 does crashes when compiling some programs using impl Trait rustc 1.26.0 crashes when compiling some programs using impl Trait May 10, 2018
@leoyvens
Copy link
Contributor

Dupe of #49376

@0x0blu
Copy link
Author

0x0blu commented May 10, 2018

Well, I did not search for issues that old

@0x0blu 0x0blu closed this as completed May 10, 2018
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