Skip to content

ICE: compilation of clang-ast v0.1.13 failed the assertion #106787

Closed
@VAmuzing

Description

@VAmuzing

Details:

The compiler failed the assertion when it was building the crate clang-ast v0.1.13
These are the compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no

Meta

rustc --version --verbose:

rustc 1.66.1 (90743e729 2023-01-10) (Rev1, Built by MSYS2 project)
binary: rustc
commit-hash: 90743e7298aca107ddaa0c202a4d3604e29bfeb6
commit-date: 2023-01-10
host: x86_64-pc-windows-gnu
release: 1.66.1
LLVM version: 15.0.5

Msys2.exe name: msys2-x86_64-20221216.exe

Error output

thread 'rustc' panicked at 'assertion failed: pos.get() <= self.position()', compiler\rustc_metadata\src\rmeta\encoder.rs:426:9
Backtrace

thread 'rustc' panicked at 'assertion failed: pos.get() <= self.position()', compiler\rustc_metadata\src\rmeta\encoder.rs:426:9
stack backtrace:
   0:     0x7ffe57f7d616 - std::backtrace_rs::backtrace::trace_unsynchronized::ha5de96ba347eafd0
   1:     0x7ffe57fb0cd2 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h86f0b2c8401c4d23
   2:     0x7ffe58021c2b - core::fmt::write::h64159b3979d9a8ee
   3:     0x7ffe57f8bd65 - std::io::Write::write_fmt::hf102e11bfde95957
   4:     0x7ffe57fb0a99 - std::sys_common::backtrace::print::h11028f9e8838163b
   5:     0x7ffe57f873bf - std::panicking::default_hook::{{closure}}::hdc2541b68d4c0642
   6:     0x7ffe57f87034 - std::panicking::default_hook::h1606c2fbb99540cf
   0:     0x7ffe57f7d616 - std::backtrace_rs::backtrace::trace_unsynchronized::ha5de96ba347eafd0
   1:     0x7ffe57fb0cd2 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h86f0b2c8401c4d23
   2:     0x7ffe58021c2b - core::fmt::write::h64159b3979d9a8ee
   3:     0x7ffe57f8bd65 - std::io::Write::write_fmt::hf102e11bfde95957
   4:     0x7ffe57fb0a99 - std::sys_common::backtrace::print::h11028f9e8838163b
   5:     0x7ffe57f873bf - std::panicking::default_hook::{{closure}}::hdc2541b68d4c0642
   6:     0x7ffe57f87034 - std::panicking::default_hook::h1606c2fbb99540cf
   7:     0x7ffe25b5b74c - rustc_driver[51b479947fb6b2c4]::DEFAULT_HOOK::{closure#0}::{closure#0}
   8:     0x7ffe57f87cd9 - std::panicking::rust_panic_with_hook::h42f16178e472c384
   9:     0x7ffe57fb13cf - std::panicking::begin_panic_handler::{{closure}}::he92c2af6cddd476a
  10:     0x7ffe57fb103f - std::sys_common::backtrace::__rust_end_short_backtrace::h68fc43e97b633613
  11:     0x7ffe57f87810 - rust_begin_unwind
  12:     0x7ffe5801f175 - core::panicking::panic_fmt::h538d8f294e3eef97
  13:     0x7ffe5801f25c - core::panicking::panic::h8329c37ec6c0781e
  14:     0x7ffe279e51a9 - <rustc_metadata[34f418474fb3aabd]::rmeta::encoder::EncodeContext>::encode_crate_root
  15:     0x7ffe279f7087 - rustc_metadata[34f418474fb3aabd]::rmeta::encoder::encode_metadata_impl
  16:     0x7ffe27af0e2d - rustc_data_structures[88bcd140e6e42ca9]::sync::join::<rustc_metadata[34f418474fb3aabd]::rmeta::encoder::encode_metadata::{closure#0}, rustc_metadata[34f418474fb3aa
bd]::rmeta::encoder::encode_metadata::{closure#1}, (), ()>
  17:     0x7ffe279f60fb - rustc_metadata[34f418474fb3aabd]::rmeta::encoder::encode_metadata
  18:     0x7ffe27a53d6e - rustc_metadata[34f418474fb3aabd]::fs::encode_and_write_metadata
  19:     0x7ffe25c46559 - <rustc_interface[b911231f48e138e8]::passes::QueryContext>::enter::<<rustc_interface[b911231f48e138e8]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}
, core[998ca2f06db80a1c]::result::Result<alloc[2e58b97199447900]::boxed::Box<dyn core[998ca2f06db80a1c]::any::Any>, rustc_errors[490555298d480402]::ErrorGuaranteed>>
  20:     0x7ffe25c08915 - <rustc_interface[b911231f48e138e8]::queries::Queries>::ongoing_codegen
  21:     0x7ffe25b2cb82 - rustc_span[5bbfdd86939e476c]::with_source_map::<core[998ca2f06db80a1c]::result::Result<(), rustc_errors[490555298d480402]::ErrorGuaranteed>, rustc_interface[b91123
1f48e138e8]::interface::run_compiler<core[998ca2f06db80a1c]::result::Result<(), rustc_errors[490555298d480402]::ErrorGuaranteed>, rustc_driver[51b479947fb6b2c4]::run_compiler::{closure#1}>::
{closure#0}::{closure#1}>
  22:     0x7ffe25b1b887 - <scoped_tls[12ed1ac40f3031d1]::ScopedKey<rustc_span[5bbfdd86939e476c]::SessionGlobals>>::set::<rustc_interface[b911231f48e138e8]::interface::run_compiler<core[998c
a2f06db80a1c]::result::Result<(), rustc_errors[490555298d480402]::ErrorGuaranteed>, rustc_driver[51b479947fb6b2c4]::run_compiler::{closure#1}>::{closure#0}, core[998ca2f06db80a1c]::result::R
esult<(), rustc_errors[490555298d480402]::ErrorGuaranteed>>
  23:     0x7ffe25ae0f27 - std[7460118f62c2f81c]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[b911231f48e138e8]::util::run_in_thread_pool_with_globals<rustc_interfa
ce[b911231f48e138e8]::interface::run_compiler<core[998ca2f06db80a1c]::result::Result<(), rustc_errors[490555298d480402]::ErrorGuaranteed>, rustc_driver[51b479947fb6b2c4]::run_compiler::{clos
ure#1}>::{closure#0}, core[998ca2f06db80a1c]::result::Result<(), rustc_errors[490555298d480402]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[998ca2f06db80a1c]::result::Result<(), rustc
_errors[490555298d480402]::ErrorGuaranteed>>
  24:     0x7ffe25ac324f - <<std[7460118f62c2f81c]::thread::Builder>::spawn_unchecked_<rustc_interface[b911231f48e138e8]::util::run_in_thread_pool_with_globals<rustc_interface[b911231f48e138
e8]::interface::run_compiler<core[998ca2f06db80a1c]::result::Result<(), rustc_errors[490555298d480402]::ErrorGuaranteed>, rustc_driver[51b479947fb6b2c4]::run_compiler::{closure#1}>::{closure
#0}, core[998ca2f06db80a1c]::result::Result<(), rustc_errors[490555298d480402]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[998ca2f06db80a1c]::result::Result<(), rustc_errors[490555298
d480402]::ErrorGuaranteed>>::{closure#1} as core[998ca2f06db80a1c]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  25:     0x7ffe57fba707 - std::sys::windows::thread::Thread::new::thread_start::h7b5a193639878ad8
  26:     0x7ffe92eb7614 - <unknown>
  27:     0x7ffe937c26a1 - <unknown>

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleI-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