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 trying to compile libstd with -Zmir-opt-level=3 #63802

Closed
bjorn3 opened this issue Aug 22, 2019 · 3 comments
Closed

ICE trying to compile libstd with -Zmir-opt-level=3 #63802

bjorn3 opened this issue Aug 22, 2019 · 3 comments
Labels
A-mir Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@bjorn3
Copy link
Member

bjorn3 commented Aug 22, 2019

error: internal compiler error: src/librustc_mir/transform/inline.rs:677: Return place is (*_28), not local

thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:643:9
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.35/src/backtrace/libunwind.rs:88
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.35/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:47
   3: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:36
   4: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:200
   5: std::panicking::default_hook
             at src/libstd/panicking.rs:214
   6: rustc::util::common::panic_hook
   7: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:481
   8: std::panicking::begin_panic
   9: rustc_errors::Handler::bug
  10: rustc::util::bug::opt_span_bug_fmt::{{closure}}
  11: rustc::ty::context::tls::with_opt::{{closure}}
  12: rustc::ty::context::tls::with_context_opt
  13: rustc::ty::context::tls::with_opt
  14: rustc::util::bug::opt_span_bug_fmt
  15: rustc::util::bug::bug_fmt
  16: <rustc_mir::transform::inline::Integrator as rustc::mir::visit::MutVisitor>::visit_local
  17: <rustc_mir::transform::inline::Integrator as rustc::mir::visit::MutVisitor>::visit_place
  18: <rustc_mir::transform::inline::Integrator as rustc::mir::visit::MutVisitor>::visit_basic_block_data
  19: rustc_mir::transform::inline::Inliner::run_pass
  20: <rustc_mir::transform::inline::Inline as rustc_mir::transform::MirPass>::run_pass
  21: rustc_mir::transform::run_passes::{{closure}}
  22: rustc_mir::transform::run_passes
  23: rustc_mir::transform::optimized_mir
  24: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::optimized_mir>::compute
  25: rustc::dep_graph::graph::DepGraph::with_task_impl
  26: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  27: rustc_mir::monomorphize::collector::collect_items_rec
  28: rustc_mir::monomorphize::collector::collect_items_rec
  29: rustc_mir::monomorphize::collector::collect_items_rec
  30: rustc_mir::monomorphize::collector::collect_items_rec
  31: rustc_mir::monomorphize::collector::collect_items_rec
  32: rustc_mir::monomorphize::collector::collect_items_rec
  33: rustc_mir::monomorphize::collector::collect_items_rec
  34: rustc_mir::monomorphize::collector::collect_items_rec
  35: rustc_mir::monomorphize::collector::collect_items_rec
  36: rustc_mir::monomorphize::collector::collect_items_rec
  37: rustc_mir::monomorphize::collector::collect_items_rec
  38: rustc_mir::monomorphize::collector::collect_items_rec
  39: rustc_mir::monomorphize::collector::collect_items_rec
  40: rustc_mir::monomorphize::collector::collect_items_rec
  41: rustc_mir::monomorphize::collector::collect_items_rec
  42: rustc_mir::monomorphize::collector::collect_items_rec
  43: rustc_mir::monomorphize::collector::collect_crate_mono_items::{{closure}}
  44: rustc_mir::monomorphize::collector::collect_crate_mono_items
  45: rustc::util::common::time
  46: rustc_mir::monomorphize::partitioning::collect_and_partition_mono_items
  47: rustc::ty::query::__query_compute::collect_and_partition_mono_items
  48: rustc::dep_graph::graph::DepGraph::with_task_impl
  49: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  50: rustc_codegen_ssa::back::symbol_export::exported_symbols_provider_local
  51: rustc::ty::query::__query_compute::exported_symbols
  52: rustc::dep_graph::graph::DepGraph::with_task_impl
  53: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  54: rustc_metadata::encoder::EncodeContext::encode_crate_root
  55: rustc::dep_graph::graph::DepGraph::with_ignore
  56: rustc_metadata::encoder::encode_metadata
  57: rustc_metadata::cstore_impl::<impl rustc::middle::cstore::CrateStore for rustc_metadata::cstore::CStore>::encode_metadata
  58: rustc::ty::context::TyCtxt::encode_metadata
  59: rustc_interface::passes::encode_and_write_metadata
  60: rustc::util::common::time
  61: rustc_interface::passes::BoxedGlobalCtxt::access::{{closure}}
  62: rustc_interface::passes::create_global_ctxt::{{closure}}
  63: rustc_interface::passes::BoxedGlobalCtxt::enter
  64: rustc_interface::queries::Query<T>::compute
  65: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::ongoing_codegen
  66: rustc_interface::interface::run_compiler_in_existing_thread_pool
  67: std::thread::local::LocalKey<T>::with
  68: scoped_tls::ScopedKey<T>::set
  69: syntax::with_globals
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
query stack during panic:
#0 [optimized_mir] processing `sys_common::thread_local::register_dtor_fallback`
#1 [collect_and_partition_mono_items] collect_and_partition_mono_items
#2 [exported_symbols] exported_symbols
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.39.0-nightly (e44fdf979 2019-08-21) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z mir-opt-level=3 -C prefer-dynamic -C debuginfo=2 -C debug-assertions=off -C overflow-checks=on -C incremental --crate-type dylib --crate-type rlib

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

error: Could not compile `std`.

I tried to compile it with the panic_unwind cargo feature set.

@hellow554

This comment has been minimized.

@rustbot rustbot added A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 22, 2019
@jonas-schievink jonas-schievink added the A-mir Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html label Aug 22, 2019
@hellow554

This comment has been minimized.

@rustbot rustbot removed the A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) label Aug 22, 2019
@matthewjasper matthewjasper added the requires-nightly This issue requires a nightly compiler in some way. label Aug 22, 2019
@jonas-schievink
Copy link
Contributor

This is working fine now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-mir Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants