Closed
Description
While attempting to build the current bobbin-sdk under Ubuntu 18.04 using rust 1.34.0-nightly (02c4c28 2019-02-26) I get a panic in rustc.
$ RUST_BACKTRACE=1 make
...
cargo build
Compiling bobbin-hz v0.1.0 (/home/pascal/Workspaces/Rust/STM32/bobbin-sdk/lib/bobbin-hz)
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:345:21
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
1: std::sys_common::backtrace::_print
at src/libstd/sys_common/backtrace.rs:70
2: std::panicking::default_hook::{{closure}}
at src/libstd/sys_common/backtrace.rs:58
at src/libstd/panicking.rs:200
3: std::panicking::default_hook
at src/libstd/panicking.rs:215
4: rustc::util::common::panic_hook
5: std::panicking::rust_panic_with_hook
at src/libstd/panicking.rs:482
6: std::panicking::continue_panic_fmt
at src/libstd/panicking.rs:385
7: rust_begin_unwind
at src/libstd/panicking.rs:312
8: core::panicking::panic_fmt
at src/libcore/panicking.rs:85
9: core::panicking::panic
at src/libcore/panicking.rs:49
10: rustc_mir::interpret::place::<impl rustc_mir::interpret::eval_context::EvalContext<'a, 'mir, 'tcx, M>>::ref_to_mplace
11: rustc_mir::interpret::place::<impl rustc_mir::interpret::eval_context::EvalContext<'a, 'mir, 'tcx, M>>::deref_operand
12: rustc_mir::interpret::place::<impl rustc_mir::interpret::eval_context::EvalContext<'a, 'mir, 'tcx, M>>::place_projection
13: rustc_mir::interpret::place::<impl rustc_mir::interpret::eval_context::EvalContext<'a, 'mir, 'tcx, M>>::eval_place
14: rustc_mir::interpret::step::<impl rustc_mir::interpret::eval_context::EvalContext<'a, 'mir, 'tcx, M>>::run
15: rustc_mir::const_eval::eval_body_using_ecx
16: rustc_mir::const_eval::const_eval_raw_provider
17: rustc::ty::query::__query_compute::const_eval_raw
18: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::const_eval_raw<'tcx>>::compute
19: rustc::dep_graph::graph::DepGraph::with_task_impl
20: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
21: rustc_mir::const_eval::const_eval_provider
22: rustc::ty::query::__query_compute::const_eval
23: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::const_eval<'tcx>>::compute
24: rustc::dep_graph::graph::DepGraph::with_task_impl
25: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
26: rustc_mir::const_eval::const_eval_provider
27: rustc::ty::query::__query_compute::const_eval
28: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::const_eval<'tcx>>::compute
29: rustc::dep_graph::graph::DepGraph::with_task_impl
30: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
31: rustc_mir::monomorphize::collector::collect_items_rec
32: rustc_mir::monomorphize::collector::collect_crate_mono_items::{{closure}}
33: rustc::util::common::time
34: rustc_mir::monomorphize::collector::collect_crate_mono_items
35: rustc::util::common::time
36: rustc_mir::monomorphize::partitioning::collect_and_partition_mono_items
37: rustc::ty::query::__query_compute::collect_and_partition_mono_items
38: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::collect_and_partition_mono_items<'tcx>>::compute
39: rustc::dep_graph::graph::DepGraph::with_task_impl
40: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
41: rustc_codegen_ssa::back::symbol_export::exported_symbols_provider_local
42: rustc::ty::query::__query_compute::exported_symbols
43: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::exported_symbols<'tcx>>::compute
44: rustc::dep_graph::graph::DepGraph::with_task_impl
45: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
46: rustc_metadata::encoder::encode_metadata
47: rustc_metadata::cstore_impl::<impl rustc::middle::cstore::CrateStore for rustc_metadata::cstore::CStore>::encode_metadata
48: rustc::ty::context::TyCtxt::encode_metadata
49: rustc_codegen_llvm::base::write_metadata
50: rustc::util::common::time
51: rustc_codegen_ssa::base::codegen_crate
52: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_utils::codegen_backend::CodegenBackend>::codegen_crate
53: rustc::util::common::time
54: rustc_driver::driver::phase_4_codegen
55: rustc_driver::driver::compile_input::{{closure}}
56: <std::thread::local::LocalKey<T>>::with
57: rustc::ty::context::TyCtxt::create_and_enter
58: rustc_driver::driver::compile_input
59: rustc_driver::run_compiler_with_pool
60: <scoped_tls::ScopedKey<T>>::set
61: rustc_driver::run_compiler
62: syntax::with_globals
63: __rust_maybe_catch_panic
at src/libpanic_unwind/lib.rs:87
64: <F as alloc::boxed::FnBox<A>>::call_box
65: std::sys::unix::thread::Thread::new::thread_start
at /rustc/02c4c28920ddfdb43e68a363b7fe59ac4c92399c/src/liballoc/boxed.rs:759
at src/libstd/sys_common/thread.rs:14
at src/libstd/sys/unix/thread.rs:81
66: start_thread
67: __clone
query stack during panic:
#0 [const_eval_raw] const-evaluating `Hz::as_u32`
#1 [const_eval] const-evaluating + checking `Hz::as_u32`
#2 [const_eval] const-evaluating + checking `Hz::as_u32`
#3 [collect_and_partition_mono_items] collect_and_partition_mono_items
#4 [exported_symbols] exported_symbols
end of query stack
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: rustc 1.34.0-nightly (02c4c2892 2019-02-26) running on x86_64-unknown-linux-gnu
note: compiler flags: -C debuginfo=2 -C incremental --crate-type lib
note: some of the compiler flags provided by cargo are hidden
error: Could not compile `bobbin-hz`.
To learn more, run the command again with --verbose.
Metadata
Metadata
Assignees
Labels
Area: Constant evaluation, covers all const contexts (static, const fn, ...)Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️High priorityRelevant to the compiler team, which will review and decide on the PR/issue.Performance or correctness regression from stable to beta.Performance or correctness regression from stable to nightly.