Skip to content

ICE compiling alloc-tls #70673

Closed
Closed
@joshlf

Description

@joshlf

When running cargo test --no-run on this commit of the alloc-tls crate, rustc panics:

$ RUST_BACKTRACE=1 cargo test --no-run
   Compiling alloc-tls v0.1.0 (<redacted>/allocators-rs/alloc-tls)
thread 'rustc' panicked at 'assertion failed: `(left == right)`
  left: `2`,
 right: `0`', src/librustc_codegen_llvm/consts.rs:438:21
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: rust_begin_unwind
   8: std::panicking::begin_panic_fmt
   9: rustc_codegen_llvm::consts::<impl rustc_codegen_ssa::traits::statics::StaticMethods for rustc_codegen_llvm::context::CodegenCx>::codegen_static
  10: <rustc::mir::mono::MonoItem as rustc_codegen_ssa::mono_item::MonoItemExt>::define
  11: rustc_codegen_llvm::base::compile_codegen_unit::module_codegen
  12: rustc::dep_graph::graph::DepGraph::with_task
  13: rustc_codegen_llvm::base::compile_codegen_unit
  14: rustc_codegen_ssa::base::codegen_crate
  15: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_utils::codegen_backend::CodegenBackend>::codegen_crate
  16: rustc_session::utils::<impl rustc_session::session::Session>::time
  17: rustc_interface::passes::start_codegen
  18: rustc::ty::context::tls::enter_global
  19: rustc_interface::queries::Queries::ongoing_codegen
  20: rustc_interface::interface::run_compiler_in_existing_thread_pool
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.44.0-nightly (f509b26a7 2020-03-18) running on x86_64-apple-darwin

note: compiler flags: -C debuginfo=2 -C incremental

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

query stack during panic:
end of query stack

Version

Platform: macos

$ rustc --version
rustc 1.44.0-nightly (f509b26a7 2020-03-18)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generationA-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️O-macosOperating system: macOST-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions