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: assertion failed: obligations.is_empty() #41298

Closed
Marwes opened this issue Apr 14, 2017 · 8 comments
Closed

ICE: assertion failed: obligations.is_empty() #41298

Marwes opened this issue Apr 14, 2017 · 8 comments
Assignees
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-high High priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly.

Comments

@Marwes
Copy link
Contributor

Marwes commented Apr 14, 2017

Getting an ICE when compiling gluon_vm after upgrading my nightly rustc version.

$ RUST_BACKTRACE=1 cargo build
   Compiling gluon_vm v0.3.0 (file:///C:/Users/Markus/Dropbox/Programming/gluon/vm)
   Compiling lalrpop-snap v0.12.5
error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: run with `RUST_BACKTRACE=1` for a backtrace

thread 'rustc' panicked at 'assertion failed: obligations.is_empty()', src\librustc\traits\coherence.rs:64
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: <std::time::SystemTimeError as core::fmt::Display>::fmt
   1: std::panicking::Location::line
   2: std::panicking::Location::line
   3: std::panicking::rust_panic_with_hook
   4: <unknown>
   5: rustc::traits::coherence::overlapping_impls
   6: <rustc_typeck::coherence::inherent_impls_overlap::InherentOverlapChecker<'a, 'tcx> as rustc::hir::itemlikevisit::ItemLikeVisitor<'v>>::visit_item
   7: <rustc_typeck::coherence::inherent_impls::InherentCollect<'a, 'tcx> as rustc::hir::itemlikevisit::ItemLikeVisitor<'v>>::visit_item
   8: rustc::ty::maps::<impl rustc::ty::maps::queries::crate_inherent_impls_overlap_check<'tcx>>::try_get
   9: rustc::ty::maps::<impl rustc::ty::maps::queries::crate_inherent_impls_overlap_check<'tcx>>::get
  10: rustc_typeck::coherence::check_coherence
  11: rustc_typeck::check_crate
  12: rustc_driver::driver::count_nodes
  13: <unknown>
  14: rustc_driver::driver::compile_input
  15: rustc_driver::run_compiler
  16: <unknown>
  17: _rust_maybe_catch_panic
  18: <unknown>
  19: std::sys::imp::thread::Thread::new

error: Could not compile `gluon_vm`.
Build failed, waiting for other jobs to finish...
$ rustc --version --verbose
rustc 1.18.0-nightly (28a742997 2017-04-13)
binary: rustc
commit-hash: 28a74299778cdad4ea999e4ee8f8c1ef793338bd
commit-date: 2017-04-13
host: x86_64-pc-windows-msvc
release: 1.18.0-nightly
LLVM version: 3.9
@Marwes
Copy link
Contributor Author

Marwes commented Apr 14, 2017

Travis built successfully using rustc 1.18.0-nightly (c58c928 2017-04-11) https://travis-ci.org/gluon-lang/gluon/jobs/221228481

@Mark-Simulacrum Mark-Simulacrum added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Apr 14, 2017
@Marwes
Copy link
Contributor Author

Marwes commented Apr 16, 2017

#40570 looks like a likely cause for this regression and @nikomatsakis mentioned being unable to create a test case for #41044. I guess there might be such a test case somewhere in gluon_vm? Not going to have time to attempt a test case extraction at the moment however.

@nikomatsakis
Copy link
Contributor

@Marwes thanks for the bug report. I'll take a look and see what I see!

@nikomatsakis
Copy link
Contributor

triage: P-high

@rust-highfive rust-highfive added the P-high High priority label Apr 18, 2017
@nikomatsakis nikomatsakis added the regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. label Apr 18, 2017
@nikomatsakis nikomatsakis self-assigned this Apr 18, 2017
@nikomatsakis
Copy link
Contributor

Minimal reproduction:

struct Function<T, F> { t: T, f: F }

impl<T, R> Function<T, fn() -> R> { fn foo() { } }
impl<T, R> Function<T, fn() -> R> { fn bar() { } }

fn main() { }

@nikomatsakis
Copy link
Contributor

This was fixed by #41377, I believe.

@nikomatsakis
Copy link
Contributor

@Marwes please let me know if you find otherwise :)

@Marwes
Copy link
Contributor Author

Marwes commented Apr 23, 2017

@nikomatsakis It's working again now! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-high High priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly.
Projects
None yet
Development

No branches or pull requests

4 participants