Skip to content

Panic while building encoding_rs_io v0.1.7 as a dependency of ripgrep v13.0.0 #86961

Closed
@ink-splatters

Description

@ink-splatters

Code

rustup-init --default-toolchain nightly
git clone https://github.com/BurntSushi/ripgrep && cd ripgrep
git checkout 9eddb71b8e86a04d7048b920b9b50a2e97068d03
RUSTFLAGS="-C target-feature=+ssse3" RUST_BACKTRACE=1 cargo install --verbose --features 'simd-accel,pcre2' ripgrep

Meta

rustc --version --verbose:

rustc 1.55.0-nightly (885399992 2021-07-06)
binary: rustc
commit-hash: 885399992c4c1dde37b506b8507a7d69415646b9
commit-date: 2021-07-06
host: x86_64-apple-darwin
release: 1.55.0-nightly
LLVM version: 12.0.1

Error output

ompiling encoding_rs_io v0.1.7
     Running `rustc --crate-name encoding_rs_io /Users/inksplatters/.cargo/registry/src/github.com-1ecc6299db9ec823/encoding_rs_io-0.1.7/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=1 -C metadata=01a19f4ad7cdacec -C extra-filename=-01a19f4ad7cdacec --out-dir /var/folders/16/6p6m5thd5fz5nt4sfmfkrg1w0000gn/T/cargo-installEwbCJf/release/deps -L dependency=/var/folders/16/6p6m5thd5fz5nt4sfmfkrg1w0000gn/T/cargo-installEwbCJf/release/deps --extern encoding_rs=/var/folders/16/6p6m5thd5fz5nt4sfmfkrg1w0000gn/T/cargo-installEwbCJf/release/deps/libencoding_rs-708ebfc4e3ac1ad7.rmeta --cap-lints allow`
error: internal compiler error: /rustc/885399992c4c1dde37b506b8507a7d69415646b9/compiler/rustc_middle/src/ty/consts.rs:195:32: expected bits of [u32; 16], got Const {
    ty: [u32; 16],
    val: Value(
        ByRef {
            alloc: Allocation {
                bytes: [
                    0,
                    0,
                    0,
                    0,
                    16,
                    0,
                    0,
                    0,
                    1,
                    0,
                    0,
                    0,
                    17,
                    0,
                    0,
                    0,
                    2,
                    0,
                    0,
                    0,
                    18,
                    0,
                    0,
                    0,
                    3,
                    0,
                    0,
                    0,
                    19,
                    0,
                    0,
                    0,
                    4,
                    0,
                    0,
                    0,
                    20,
                    0,
                    0,
                    0,
                    5,
                    0,
                    0,
                    0,
                    21,
                    0,
                    0,
                    0,
                    6,
                    0,
                    0,
                    0,
                    22,
                    0,
                    0,
                    0,
                    7,
                    0,
                    0,
                    0,
                    23,
                    0,
                    0,
                    0,
                ],
                relocations: Relocations(
                    SortedMap {
                        data: [],
                    },
                ),
                init_mask: InitMask {
                    blocks: [
                        18446744073709551615,
                        0,
                    ],
                    len: Size {
                        raw: 64,
                    },
                },
                align: Align {
                    pow2: 2,
                },
                mutability: Not,
                extra: (),
            },
            offset: Size {
                raw: 0,
            },
        },
    ),
}

thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1035:9
Backtrace

   0:        0x108367b74 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h34b3603c71719f6e
   1:        0x1083cc3ec - core::fmt::write::h8160330c41daaf61
   2:        0x108359a7a - std::io::Write::write_fmt::he00fb8a17eedd7e2
   3:        0x10836b81f - std::panicking::default_hook::{{closure}}::h06b7d0f8994e0048
   4:        0x10836b31d - std::panicking::default_hook::h7374470051a00994
   5:        0x10c5b2140 - rustc_driver::DEFAULT_HOOK::{{closure}}::{{closure}}::hbad8576674ddaa49
   6:        0x10836c076 - std::panicking::rust_panic_with_hook::hd84131252813317c
   7:        0x110769031 - std::panicking::begin_panic::{{closure}}::h6b6e6b7c52831570
   8:        0x110769009 - std::sys_common::backtrace::__rust_end_short_backtrace::ha8bf5bfda07f87a5
   9:        0x110a46df1 - std::panicking::begin_panic::h63d928fdac4c2444
  10:        0x1107965f0 - std::panic::panic_any::hce85e00a15e34e48
  11:        0x11079cc0c - rustc_errors::HandlerInner::bug::h8750061d7c630e4f
  12:        0x11079a9e7 - rustc_errors::Handler::bug::ha70c63035489cb37
  13:        0x1104756c6 - rustc_middle::util::bug::opt_span_bug_fmt::{{closure}}::ha73fadbfe63baca3
  14:        0x110473926 - rustc_middle::ty::context::tls::with_opt::{{closure}}::h37e7e5d90ef41454
  15:        0x1104738ef - rustc_middle::ty::context::tls::with_opt::h139751c8f1db4e78
  16:        0x11047560b - rustc_middle::util::bug::opt_span_bug_fmt::h1a0ab06216a61b85
  17:        0x110a337ef - rustc_middle::util::bug::bug_fmt::h1535e8fbeb620914
  18:        0x10fc02c4c - rustc_middle::ty::consts::Const::eval_bits::{{closure}}::hd0c037716e3750e9
  19:        0x10fc0a02c - rustc_codegen_ssa::debuginfo::type_names::push_generic_params_internal::h09f4eb7a3690f3f4
  20:        0x10fc0a149 - rustc_codegen_ssa::debuginfo::type_names::push_generic_params::hb9ff526a9aaed71d
  21:        0x10c8283f4 - rustc_codegen_llvm::debuginfo::<impl rustc_codegen_ssa::traits::debuginfo::DebugInfoMethods for rustc_codegen_llvm::context::CodegenCx>::dbg_scope_fn::get_template_parameters::hf4e5014bde3bd0ae
  22:        0x10c80e9a9 - rustc_codegen_llvm::debuginfo::<impl rustc_codegen_ssa::traits::debuginfo::DebugInfoMethods for rustc_codegen_llvm::context::CodegenCx>::dbg_scope_fn::hfdef23b6d869afcc
  23:        0x10c80e389 - rustc_codegen_llvm::debuginfo::<impl rustc_codegen_ssa::traits::debuginfo::DebugInfoMethods for rustc_codegen_llvm::context::CodegenCx>::create_function_debug_context::h27ca46ff78d77d74
  24:        0x10c87f4d5 - rustc_codegen_ssa::mir::codegen_mir::haedb158b46ee2778
  25:        0x10c817829 - rustc_codegen_ssa::base::codegen_instance::hde39d6762d9d51d3
  26:        0x10c841cf7 - <rustc_middle::mir::mono::MonoItem as rustc_codegen_ssa::mono_item::MonoItemExt>::define::h432c4e419b9e9714
  27:        0x10c84f7b7 - rustc_codegen_llvm::base::compile_codegen_unit::module_codegen::h34a0dcef02a2e0b8
  28:        0x10c81989c - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task::hf40ced81813c1b58
  29:        0x10c84f09b - rustc_codegen_llvm::base::compile_codegen_unit::hf964629f0265b265
  30:        0x10c82bb09 - <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate::h2ab78f5b04584b8c
  31:        0x10c6d0d5f - rustc_interface::passes::QueryContext::enter::he39257bb4663642a
  32:        0x10c6c2260 - rustc_interface::queries::Queries::ongoing_codegen::h95777a37bb20b6bd
  33:        0x10c5ef1a4 - rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter::h184befdebe6c8084
  34:        0x10c5c07c6 - rustc_span::with_source_map::hd47625ae95a3b5cf
  35:        0x10c5eff02 - rustc_interface::interface::create_compiler_and_run::h2ec1393256240e4c
  36:        0x10c5c83af - scoped_tls::ScopedKey<T>::set::h67c9a7d0441e78ae
  37:        0x10c5c0ed9 - std::sys_common::backtrace::__rust_begin_short_backtrace::hd2f1b09be748a637
  38:        0x10c5b5a7d - core::ops::function::FnOnce::call_once{{vtable.shim}}::hfbe424b42856470a
  39:        0x10837758b - std::sys::unix::thread::Thread::new::thread_start::he7d90f5704b14448
  40:     0x7fff204048fc - __pthread_start

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-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