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 on thumbv7em-none-eabi : Cannot create local mono-item for DefID #59017

Closed
niklasad1 opened this issue Mar 8, 2019 · 1 comment
Closed

Comments

@niklasad1
Copy link

When trying to compile this branch

$ cd boards/launchxl && make check 
RUSTFLAGS="-C link-arg=-Tlayout.ld -C linker=rust-lld -C linker-flavor=ld.lld -C relocation-model=dynamic-no-pic -C link-arg=-zmax-page-size=512" cargo check --target=thumbv7em-none-eabi --verbose --release
error: internal compiler error: src/librustc_mir/monomorphize/collector.rs:745: Cannot create local mono-item for DefId(7/0:53 ~ cortexm4[8879]::hard_fault_handler[0])

thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:620:9
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:71
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:59
             at src/libstd/panicking.rs:197
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:211
   4: rustc::util::common::panic_hook
   5: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:478
   6: std::panicking::begin_panic
   7: rustc_errors::Handler::bug
   8: rustc::util::bug::opt_span_bug_fmt::{{closure}}
   9: rustc::ty::context::tls::with_opt::{{closure}}
  10: rustc::ty::context::tls::with_context_opt
  11: rustc::ty::context::tls::with_opt
  12: rustc::util::bug::opt_span_bug_fmt
  13: rustc::util::bug::bug_fmt
  14: rustc_mir::monomorphize::collector::should_monomorphize_locally
  15: rustc_mir::monomorphize::collector::collect_miri
  16: rustc_mir::monomorphize::collector::collect_items_rec
  17: rustc_mir::monomorphize::collector::collect_crate_mono_items::{{closure}}
  18: rustc::util::common::time
  19: rustc_mir::monomorphize::collector::collect_crate_mono_items
  20: rustc::util::common::time
  21: rustc_mir::monomorphize::partitioning::collect_and_partition_mono_items
  22: rustc::ty::query::__query_compute::collect_and_partition_mono_items
  23: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::collect_and_partition_mono_items<'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: core::ops::function::FnOnce::call_once
  27: rustc::ty::query::__query_compute::backend_optimization_level
  28: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::backend_optimization_level<'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_codegen_llvm::back::write::create_target_machine
  32: rustc_codegen_llvm::context::create_module
  33: rustc_codegen_ssa::base::codegen_crate
  34: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_utils::codegen_backend::CodegenBackend>::codegen_crate
  35: rustc::util::common::time
  36: rustc_driver::driver::phase_4_codegen
  37: <std::thread::local::LocalKey<T>>::with
  38: rustc::ty::context::TyCtxt::create_and_enter
  39: rustc_driver::driver::compile_input
  40: rustc_driver::run_compiler_with_pool
  41: <scoped_tls::ScopedKey<T>>::set
  42: rustc_driver::run_compiler
  43: syntax::with_globals
  44: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:87
  45: <F as alloc::boxed::FnBox<A>>::call_box
  46: std::sys::unix::thread::Thread::new::thread_start
             at /rustc/87a436377a7cddd1d4426c9604c48e0aa2ec0b11/src/liballoc/boxed.rs:759
             at src/libstd/sys_common/thread.rs:14
             at src/libstd/sys/unix/thread.rs:80
  47: start_thread
  48: __clone
query stack during panic:
#0 [collect_and_partition_mono_items] collect_and_partition_mono_items
#1 [backend_optimization_level] optimization level used by backend
end of query stack
error: aborting due to previous error


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.35.0-nightly (87a436377 2019-03-03) running on x86_64-unknown-linux-gnu

note: compiler flags: -C opt-level=z -C panic=abort -C debuginfo=2 -C incremental -C link-arg=-Tlayout.ld -C linker=rust-lld -C linker-flavor=ld.lld -C relocation-model=dynamic-no-pic -C link-arg=-zmax-page-size=512 --crate-type lib

note: some of the compiler flags provided by cargo are hidden

error: Could not compile `cc26x2`.

Note: I tried this on nightly 88f755f8a 2019-03-07 with the same behaviour

@jonas-schievink
Copy link
Contributor

Duplicate of #58323

@jonas-schievink jonas-schievink marked this as a duplicate of #58323 Mar 8, 2019
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