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

Link error with incremental and impl trait #45800

Closed
MaikKlein opened this issue Nov 6, 2017 · 6 comments
Closed

Link error with incremental and impl trait #45800

MaikKlein opened this issue Nov 6, 2017 · 6 comments
Labels
A-impl-trait Area: impl Trait. Universally / existentially quantified anonymous types with static dispatch. A-incr-comp Area: Incremental compilation A-linkage Area: linking into static, shared libraries and binaries C-bug Category: This is a bug. I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

Comments

@MaikKlein
Copy link
Contributor

I was able to reproduce the link error reliably on my machine.

https://github.com/MaikKlein/spire-lang/tree/e0ca3221776f0ce35c1b49f7fdef413512efc656

CARGO_INCREMENTAL=1 cargo build --release

Then go and change this line from

many(ast_object.or(ast_data).skip(whitespace()))

to

many(ast_object.or(ast_data))

And do another CARGO_INCREMENTAL=1 cargo build --release

error gist

Os: Ubuntu 16.04 x64

rustc 1.23.0-nightly (3b82e4c74 2017-11-05)
binary: rustc
commit-hash: 3b82e4c74d43fc1273244532c3a90bf9912061cf
commit-date: 2017-11-05
host: x86_64-unknown-linux-gnu
release: 1.23.0-nightly
LLVM version: 4.0
@MaikKlein
Copy link
Contributor Author

cc @michaelwoerister

@michaelwoerister
Copy link
Member

Thanks for the bug report, @MaikKlein!

Does this also occur when you compile the code non-incrementally but with -Ccodegen-units=9999?

@michaelwoerister michaelwoerister added A-incr-comp Area: Incremental compilation A-impl-trait Area: impl Trait. Universally / existentially quantified anonymous types with static dispatch. A-linkage Area: linking into static, shared libraries and binaries I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics. labels Nov 6, 2017
@MaikKlein
Copy link
Contributor Author

MaikKlein commented Nov 6, 2017

@michaelwoerister Yes this also happens with -Ccodegen-units=9999.

Edit:

I also tried to reproduce it without any dependencies but I couldn't do it.

@michaelwoerister
Copy link
Member

Thanks! Might be another hole in the reachability pass. cc @eddyb

@TimNN TimNN added the C-bug Category: This is a bug. label Nov 7, 2017
@MaikKlein
Copy link
Contributor Author

@michaelwoerister I just tested it again with

rustc 1.24.0-nightly (7eb64b86c 2017-12-20)
binary: rustc
commit-hash: 7eb64b86ce44cc1828dd176a8b981e37ea08fc38
commit-date: 2017-12-20
host: x86_64-unknown-linux-gnu
release: 1.24.0-nightly
LLVM version: 4.0

And I can't reproduce it anymore. It seems to be fixed.

@michaelwoerister
Copy link
Member

Thanks for checking back, @MaikKlein! I'll close for now. Feel free to open another issue if the problem re-appears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-impl-trait Area: impl Trait. Universally / existentially quantified anonymous types with static dispatch. A-incr-comp Area: Incremental compilation A-linkage Area: linking into static, shared libraries and binaries C-bug Category: This is a bug. I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
Projects
None yet
Development

No branches or pull requests

3 participants