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

Internal compiler error with Rust 1.33.0 #91

Closed
leenozara opened this issue Jan 3, 2019 · 1 comment
Closed

Internal compiler error with Rust 1.33.0 #91

leenozara opened this issue Jan 3, 2019 · 1 comment
Labels

Comments

@leenozara
Copy link

Hi @mehcode I'm getting a compiler error since the latest Rust 1.33.0 nightly.

Error:

error: internal compiler error: src/librustc_mir/monomorphize/collector.rs:747: Cannot create local mono-item for DefId(45/0:303 ~ config[fd64]::file[0]::{{impl}}[1]::with_name[0])

To reproduce:

git clone https://github.com/riker-rs/riker.git
git checkout r2018
cargo build

This error is caused by this line in src/lib.rs:

cfg.merge(File::with_name(&format!("{}", path)).required(false)).unwrap();

It seems that specifically File::with_name causes the compiler error. I've tried both versions 0.8 and 0.9 of Config.

There was no error a few days ago before Rust 1.33.0.

Backtrace

``` thread 'rustc' panicked at 'Box', src/librustc_errors/lib.rs:590: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: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::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::visit_instance_use 16: as rustc::mir::visit::Visitor<'tcx>>::visit_terminator_kind 17: rustc_mir::monomorphize::collector::collect_items_rec 18: rustc_mir::monomorphize::collector::collect_crate_mono_items::{{closure}} 19: rustc::util::common::time 20: rustc_mir::monomorphize::collector::collect_crate_mono_items 21: rustc::util::common::time 22: rustc_mir::monomorphize::partitioning::collect_and_partition_mono_items 23: rustc::ty::query::__query_compute::collect_and_partition_mono_items 24: rustc::ty::query:: for rustc::ty::query::queries::collect_and_partition_mono_items<'tcx>>::compute 25: rustc::dep_graph::graph::DepGraph::with_task_impl 26: >::start 27: rustc::ty::query::plumbing::>::force_query_with_job 28: rustc::ty::query::plumbing::>::try_get_with 29: rustc_codegen_ssa::back::symbol_export::exported_symbols_provider_local 30: rustc::ty::query::__query_compute::exported_symbols 31: rustc::ty::query:: for rustc::ty::query::queries::exported_symbols<'tcx>>::compute 32: rustc::dep_graph::graph::DepGraph::with_task_impl 33: >::start 34: rustc::ty::query::plumbing::>::force_query_with_job 35: rustc::ty::query::plumbing::>::try_get_with 36: rustc_metadata::encoder::encode_metadata 37: rustc_metadata::cstore_impl::::encode_metadata 38: rustc::ty::context::TyCtxt::encode_metadata 39: ::write_metadata 40: rustc::util::common::time 41: rustc_codegen_ssa::base::codegen_crate 42: ::codegen_crate 43: rustc_driver::driver::phase_4_codegen 44: rustc_driver::driver::compile_input::{{closure}} 45: >::with 46: rustc::ty::context::TyCtxt::create_and_enter 47: rustc_driver::driver::compile_input 48: rustc_driver::run_compiler_with_pool 49: >::set 50: rustc_driver::run_compiler 51: >::set 52: syntax::with_globals 53: __rust_maybe_catch_panic at src/libpanic_unwind/lib.rs:92 54: >::call_box 55: std::sys::unix::thread::Thread::new::thread_start at /rustc/b2b7a063af39455d7362524da3123c34c3f4842e/src/liballoc/boxed.rs:734 at src/libstd/sys_common/thread.rs:14 at src/libstd/sys/unix/thread.rs:81 56: start_thread 57: clone 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

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.33.0-nightly (b2b7a063a 2019-01-01) 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 riker.

</p>
</details>
@mehcode mehcode added the bug label Jan 3, 2019
@mehcode mehcode closed this as completed in db16b68 Jan 3, 2019
@mehcode
Copy link
Owner

mehcode commented Jan 3, 2019

Thanks for reporting. This should be fixed now. Apparently I was accidentally relying on some UB for monomorphic expansion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants