Skip to content

internal compiler error: librustc_trans/mir/block.rs:638 #48873

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

Closed
glandium opened this issue Mar 9, 2018 · 1 comment
Closed

internal compiler error: librustc_trans/mir/block.rs:638 #48873

glandium opened this issue Mar 9, 2018 · 1 comment

Comments

@glandium
Copy link
Contributor

glandium commented Mar 9, 2018

error: internal compiler error: librustc_trans/mir/block.rs:638: trans_argument: OperandRef(Immediate(({ [0 x i8]*, i64 }:{ [0 x i8]*, i64 } undef)) @ TyLayout { ty: &[u8], details: LayoutDetails { variants: Single { index: 0 }, fields: Arbitrary { offsets: [Size { raw: 0 }, Size { raw: 8 }], memory_index: [0, 1] }, abi: ScalarPair(Scalar { value: Pointer, valid_range: 1..=18446744073709551615 }, Scalar { value: Int(I64, false), valid_range: 0..=18446744073709551615 }), align: Align { abi: 3, pref: 3 }, size: Size { raw: 16 } } }) invalid for pair arugment

thread 'rustc' panicked at 'Box<Any>', librustc_errors/lib.rs:535:9
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at libstd/sys_common/backtrace.rs:59
             at libstd/panicking.rs:207
   3: std::panicking::default_hook
             at libstd/panicking.rs:223
   4: core::ops::function::Fn::call
   5: std::panicking::rust_panic_with_hook
             at libstd/panicking.rs:403
   6: std::panicking::begin_panic
   7: rustc_errors::Handler::bug
   8: rustc::session::opt_span_bug_fmt::{{closure}}
   9: rustc::ty::context::tls::with_opt::{{closure}}
  10: <std::thread::local::LocalKey<T>>::try_with
  11: <std::thread::local::LocalKey<T>>::with
  12: rustc::ty::context::tls::with
  13: rustc::ty::context::tls::with_opt
  14: rustc::session::opt_span_bug_fmt
  15: rustc::session::bug_fmt
  16: rustc_trans::mir::block::<impl rustc_trans::mir::FunctionCx<'a, 'tcx>>::trans_argument
  17: rustc_trans::mir::block::<impl rustc_trans::mir::FunctionCx<'a, 'tcx>>::trans_terminator
  18: rustc_trans::mir::trans_mir
  19: rustc_trans::base::trans_instance
  20: rustc_trans::base::compile_codegen_unit
  21: rustc::dep_graph::graph::DepGraph::with_task_impl
  22: rustc::ty::maps::<impl rustc::ty::maps::queries::compile_codegen_unit<'tcx>>::force
  23: rustc::ty::maps::<impl rustc::ty::maps::queries::compile_codegen_unit<'tcx>>::try_get
  24: rustc::ty::maps::TyCtxtAt::compile_codegen_unit
  25: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::compile_codegen_unit
  26: rustc_trans::base::trans_crate
  27: <rustc_trans::LlvmTransCrate as rustc_trans_utils::trans_crate::TransCrate>::trans_crate
  28: rustc_driver::driver::phase_4_translate_to_llvm
  29: rustc_driver::driver::compile_input::{{closure}}
  30: rustc::ty::context::TyCtxt::create_and_enter
  31: rustc_driver::driver::compile_input
  32: rustc_driver::run_compiler

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.26.0-nightly (2789b067d 2018-03-06) running on x86_64-unknown-linux-gnu

note: compiler flags: -C opt-level=3 -C panic=abort --crate-type lib

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

I could reproduce with 1.24.1 too. This only happens when compiling with --release. I'm committing the state of my code that produces this locally so that I can find it if necessary. In that case, I'll try to come up with a reduced test case.

@glandium
Copy link
Contributor Author

glandium commented Mar 9, 2018

Duplicate of #46730

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

1 participant