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 in crate matrixmultiply with newest nightly #43375

Closed
DarkDrek opened this issue Jul 20, 2017 · 2 comments
Closed

ICE in crate matrixmultiply with newest nightly #43375

DarkDrek opened this issue Jul 20, 2017 · 2 comments
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ regression-from-stable-to-nightly Performance or correctness regression from stable to nightly.

Comments

@DarkDrek
Copy link

DarkDrek commented Jul 20, 2017

Can't compile the crate matrixmultiply (https://crates.io/crates/matrixmultiply)
It seems to not compile anymore since this commit.
And the line assert!(mr * nr * size_of::<K::Elem>() <= 256 && K::align_to() <= 32); is the cause.

Minimal code to reproduce (playground)

use std::mem::size_of;

pub trait GemmKernel {
    type Elem;
}

pub type T = f32;

pub enum Gemm { }

impl GemmKernel for Gemm {
    type Elem = T;
}

fn gemm_packed<K>()
where
    K: GemmKernel,
{
    assert!(size_of::<K::Elem>() <= 256);
}

fn main() {
    println!("Hello, world!");
}

My system:
rustc 1.20.0-nightly (582af6e 2017-07-19) running on x86_64-unknown-linux-gnu
binary: rustc
commit-hash: 582af6e
commit-date: 2017-07-19
LLVM version: 4.0

Backtrace:
error: internal compiler error: /checkout/src/librustc/infer/mod.rs:573: Encountered errors [FulfillmentError(Obligation(predicate=Binder(TraitPredicate(<K as kernel::GemmKernel>)),depth=0),Unimplemented)] resolving bounds after type-checking

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: rustc 1.20.0-nightly (582af6e 2017-07-19) running on x86_64-unknown-linux-gnu

note: run with RUST_BACKTRACE=1 for a backtrace

thread 'rustc' panicked at 'Box', /checkout/src/librustc_errors/lib.rs:437:8
stack backtrace:
0: 0x7f9e7e1c5a03 - std::sys::imp::backtrace::tracing::imp::unwind_backtrace::h0155dbb6ca59ce6e
at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: 0x7f9e7e1c00e4 - std::sys_common::backtrace::_print::h5f4f2ec19ff00311
at /checkout/src/libstd/sys_common/backtrace.rs:71
2: 0x7f9e7e1d3883 - std::panicking::default_hook::{{closure}}::hafc0eefa360df4ab
at /checkout/src/libstd/sys_common/backtrace.rs:60
at /checkout/src/libstd/panicking.rs:380
3: 0x7f9e7e1d3578 - std::panicking::default_hook::h83538a8b6a433831
at /checkout/src/libstd/panicking.rs:390
4: 0x7f9e7e1d3d87 - std::panicking::rust_panic_with_hook::hae3224b5f6b814fd
at /checkout/src/libstd/panicking.rs:611
5: 0x7f9e7aeafeb8 - std::panicking::begin_panic_new::h6672f948a100c2a1
6: 0x7f9e7ae9a2a1 - rustc_errors::Handler::span_bug::hc43628812f7bb545
7: 0x7f9e7b0d84e3 - rustc::session::opt_span_bug_fmt::{{closure}}::h36f1c23dee0ab88c
8: 0x7f9e7b0d8202 - rustc::session::opt_span_bug_fmt::hb3234649816b9313
9: 0x7f9e7b0d80d3 - rustc::session::span_bug_fmt::h7088a0e5e41c572a
10: 0x7f9e7b19045f - <&'gcx rustc::ty::TyS<'gcx> as rustc::infer::TransNormalize<'gcx>>::trans_normalize::hf754271ad7f5ecb6
11: 0x7f9e7b05207d - rustc::infer::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'tcx>>::normalize_associated_type_in_env::h302f650510c2da58
12: 0x7f9e7b1325e1 - rustc::ty::layout::Layout::compute_uncached::h7f115120b7e746d8
13: 0x7f9e7b1565ca - rustc::ty::util::layout_raw::h8e132d2c99ca2da6
14: 0x7f9e7b1fd819 - rustc::ty::maps::<impl rustc::ty::maps::queries::layout_raw<'tcx>>::try_get::h00900307c9b08a50
15: 0x7f9e7b20a5ff - rustc::ty::maps::TyCtxtAt::layout_raw::hc104cf8d0b71516c
16: 0x7f9e7b20570d - rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::layout_raw::had53de086a1553d2
17: 0x7f9e7ba73784 - rustc_const_eval::eval::eval_const_expr_partial::{{closure}}::hdf1b1c1933b44d19
18: 0x7f9e7ba6d933 - rustc_const_eval::eval::eval_const_expr_partial::h5a0fa592a92b3a61
19: 0x7f9e7ba6d5fb - rustc_const_eval::eval::eval_const_expr_partial::h5a0fa592a92b3a61
20: 0x7f9e7ba6d5fb - rustc_const_eval::eval::eval_const_expr_partial::h5a0fa592a92b3a61
21: 0x7f9e7ba70f72 - rustc_const_eval::eval::eval_const_expr_partial::h5a0fa592a92b3a61
22: 0x7f9e7ba6cca0 - rustc_const_eval::eval::ConstContext::eval::h383a143d122477ef
23: 0x7f9e7d93e740 - <rustc_passes::consts::CheckCrateVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_expr::hf35ee466267e49b2
24: 0x7f9e7d93e5d5 - <rustc_passes::consts::CheckCrateVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_expr::hf35ee466267e49b2
25: 0x7f9e7d93e228 - <rustc_passes::consts::CheckCrateVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_expr::hf35ee466267e49b2
26: 0x7f9e7d93e5d5 - <rustc_passes::consts::CheckCrateVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_expr::hf35ee466267e49b2
27: 0x7f9e7d93e2b7 - <rustc_passes::consts::CheckCrateVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_expr::hf35ee466267e49b2
28: 0x7f9e7d93e3c7 - <rustc_passes::consts::CheckCrateVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_expr::hf35ee466267e49b2
29: 0x7f9e7d93d0b9 - <rustc_passes::consts::CheckCrateVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_nested_body::hefec5d46b6b699fa
30: 0x7f9e7d93eddc - rustc_passes::consts::check_crate::h923f5bb61e5540fc
31: 0x7f9e7e5754a5 - rustc_driver::driver::phase_3_run_analysis_passes::{{closure}}::h60b971f27694dab9
32: 0x7f9e7e56dbc3 - rustc_driver::driver::phase_3_run_analysis_passes::hd1ef7181394c7568
33: 0x7f9e7e54eecd - rustc_driver::driver::compile_input::h0c538d591196658d
34: 0x7f9e7e594195 - rustc_driver::run_compiler::h00b9147f2ffd288b
35: 0x7f9e7e4ad247 - std::sys_common::backtrace::__rust_begin_short_backtrace::hefa140dc360bd2e2
36: 0x7f9e7e2032cc - __rust_maybe_catch_panic
at /checkout/src/libpanic_unwind/lib.rs:98
37: 0x7f9e7e4e49b0 - <F as alloc::boxed::FnBox>::call_box::haaadeb4d67112a83
38: 0x7f9e7e1d277b - std::sys::imp::thread::Thread::new::thread_start::heb3ab1fa2e79a8b9
at /checkout/src/liballoc/boxed.rs:661
at /checkout/src/libstd/sys_common/thread.rs:21
at /checkout/src/libstd/sys/unix/thread.rs:84
39: 0x7f9e79382493 - start_thread
40: 0x7f9e7de85a8e - __clone
41: 0x0 -

error: Could not compile matrixmultiply.

@DarkDrek DarkDrek changed the title Can't compile the crate matrixmultiply with newest nightly ICE in crate matrixmultiply with newest nightly Jul 20, 2017
@sfackler sfackler added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. labels Jul 21, 2017
@SpaceManiac
Copy link

Same as #43394

@Mark-Simulacrum Mark-Simulacrum added the C-bug Category: This is a bug. label Jul 22, 2017
@alexcrichton
Copy link
Member

Looks to be so!

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

No branches or pull requests

5 participants