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 "alloc id without corresponding allocation: 215" with mir inlining #66668

Closed
bjorn3 opened this issue Nov 23, 2019 · 2 comments
Closed

ICE "alloc id without corresponding allocation: 215" with mir inlining #66668

bjorn3 opened this issue Nov 23, 2019 · 2 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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@bjorn3
Copy link
Member

bjorn3 commented Nov 23, 2019

$ git clone https://github.com/ebobby/simple-raytracer
$ git checkout 804a7a21b9e673a482797aa289a18ed480e4d813
$ RUSTFLAGS="-Zmir-opt-level=3" cargo build
[...]
error: internal compiler error: src/librustc_mir/monomorphize/collector.rs:1240: alloc id without corresponding allocation: 215

thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:892:9
stack backtrace:
   0: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
   1: core::fmt::write
   2: std::io::Write::write_fmt
   3: std::panicking::default_hook::{{closure}}
   4: std::panicking::default_hook
   5: rustc_driver::report_ice
   6: std::panicking::rust_panic_with_hook
   7: std::panicking::begin_panic
   8: rustc_errors::HandlerInner::bug
   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_opt
  13: rustc::util::bug::opt_span_bug_fmt
  14: rustc::util::bug::bug_fmt
  15: rustc_mir::monomorphize::collector::collect_miri
  16: rustc_mir::monomorphize::collector::collect_const
  17: <rustc_mir::monomorphize::collector::MirNeighborCollector as rustc::mir::visit::Visitor>::visit_rvalue
  18: rustc_mir::monomorphize::collector::collect_items_rec
  19: rustc_mir::monomorphize::collector::collect_items_rec
  20: rustc_mir::monomorphize::collector::collect_items_rec
  21: rustc_mir::monomorphize::collector::collect_items_rec
  22: rustc_mir::monomorphize::collector::collect_items_rec
  23: rustc_mir::monomorphize::collector::collect_items_rec
  24: rustc_mir::monomorphize::collector::collect_items_rec
  25: rustc_mir::monomorphize::collector::collect_items_rec
  26: rustc_mir::monomorphize::collector::collect_items_rec
  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_crate_mono_items::{{closure}}
  32: rustc::util::common::time
  33: rustc_mir::monomorphize::collector::collect_crate_mono_items
  34: rustc::util::common::time
  35: rustc_mir::monomorphize::partitioning::collect_and_partition_mono_items
  36: rustc::ty::query::__query_compute::collect_and_partition_mono_items
  37: rustc::dep_graph::graph::DepGraph::with_task_impl
  38: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  39: rustc_codegen_ssa::back::symbol_export::exported_symbols_provider_local
  40: rustc::ty::query::__query_compute::exported_symbols
  41: rustc::dep_graph::graph::DepGraph::with_task_impl
  42: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  43: rustc_metadata::rmeta::encoder::EncodeContext::encode_crate_root
  44: rustc::ty::context::tls::with_context::{{closure}}
  45: rustc_metadata::rmeta::encoder::encode_metadata
  46: rustc_metadata::rmeta::decoder::cstore_impl::<impl rustc::middle::cstore::CrateStore for rustc_metadata::cstore::CStore>::encode_metadata
  47: rustc::ty::context::TyCtxt::encode_metadata
  48: rustc_interface::passes::start_codegen::{{closure}}
  49: rustc_interface::passes::start_codegen
  50: rustc::ty::context::tls::enter_global
  51: rustc_interface::passes::BoxedGlobalCtxt::access::{{closure}}
  52: rustc_interface::passes::create_global_ctxt::{{closure}}
  53: rustc_interface::passes::BoxedGlobalCtxt::enter
  54: rustc_interface::queries::Query<T>::compute
  55: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::ongoing_codegen
  56: rustc_interface::interface::run_compiler_in_existing_thread_pool
  57: std::thread::local::LocalKey<T>::with
  58: syntax::with_globals
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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.41.0-nightly (5fa0af232 2019-11-22) running on x86_64-apple-darwin

note: compiler flags: -Z mir-opt-level=3 -C debuginfo=2 --crate-type lib

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

query stack during panic:
#0 [collect_and_partition_mono_items] collect_and_partition_mono_items
#1 [exported_symbols] exported_symbols
end of query stack
error: aborting due to previous error

error: could not compile `scoped_threadpool`.
warning: build failed, waiting for other jobs to finish...
thread 'rustc' panicked at 'no value for given alloc ID', src/libcore/option.rs:1187:5
stack backtrace:
   0: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
   1: core::fmt::write
   2: std::io::Write::write_fmt
   3: std::panicking::default_hook::{{closure}}
   4: std::panicking::default_hook
   5: rustc_driver::report_ice
   6: std::panicking::rust_panic_with_hook
   7: std::panicking::continue_panic_fmt
   8: rust_begin_unwind
   9: core::panicking::panic_fmt
  10: core::option::expect_failed
  11: rustc::mir::interpret::specialized_encode_alloc_id
  12: rustc_metadata::rmeta::encoder::EncodeContext::encode_crate_root
  13: rustc::ty::context::tls::with_context::{{closure}}
  14: rustc_metadata::rmeta::encoder::encode_metadata
  15: rustc_metadata::rmeta::decoder::cstore_impl::<impl rustc::middle::cstore::CrateStore for rustc_metadata::cstore::CStore>::encode_metadata
  16: rustc::ty::context::TyCtxt::encode_metadata
  17: rustc_interface::passes::start_codegen::{{closure}}
  18: rustc_interface::passes::start_codegen
  19: rustc::ty::context::tls::enter_global
  20: rustc_interface::passes::BoxedGlobalCtxt::access::{{closure}}
  21: rustc_interface::passes::create_global_ctxt::{{closure}}
  22: rustc_interface::passes::BoxedGlobalCtxt::enter
  23: rustc_interface::queries::Query<T>::compute
  24: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::ongoing_codegen
  25: rustc_interface::interface::run_compiler_in_existing_thread_pool
  26: std::thread::local::LocalKey<T>::with
  27: syntax::with_globals
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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.41.0-nightly (5fa0af232 2019-11-22) running on x86_64-apple-darwin

note: compiler flags: -Z mir-opt-level=3 -C debuginfo=2 --crate-type lib

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

query stack during panic:
end of query stack
error: could not compile `crossbeam-utils`.
warning: build failed, waiting for other jobs to finish...
error: build failed
@jonas-schievink jonas-schievink added A-MIR Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 23, 2019
@wesleywiser
Copy link
Member

IMO probably a duplicate of #66345

@bjorn3
Copy link
Member Author

bjorn3 commented Nov 23, 2019

I think so too.

@bjorn3 bjorn3 closed this as completed Nov 23, 2019
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. 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

3 participants