Skip to content

build error: the compiler unexpectedly panicked while building askama_parser #119994

Closed as not planned
@piaoger

Description

@piaoger

I cannot reproduce with minimal code if move it away from my big workspace. While In my origin crate, both "cargo check" and "cargo test" crashes the build even if lib.rs is empty.

please let me know if you need more information.

Code

[package]
name = "defect-reproduce"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
which = "4.4"
regex = "1.10"
askama = "0.12"
uuid = { version = "1.4", features = ["serde", "v4", "v7", "js"] }

nalgebra = "0.32"
nalgebra-glm = "0.18"

lazy_static="1.4"

serde_json = "1.0"
serde = { version = '1.0', features = ['derive'] }
log = "0.4"

Meta

rustc --version --verbose:

rustc 1.75.0 (82e1608df 2023-12-21)
binary: rustc
commit-hash: 82e1608dfa6e0b5569232559e3d385fea5a93112
commit-date: 2023-12-21
host: x86_64-unknown-linux-gnu
release: 1.75.0

Error output

Backtrace

   Compiling askama_parser v0.2.0
thread 'rustc' panicked at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/compiler/rustc_serialize/src/opaque.rs:233:42:
range start index 3488154 out of range for slice of length 2037791
stack backtrace:
   0: rust_begin_unwind
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:645:5
   1: core::panicking::panic_fmt
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:72:14
   2: core::slice::index::slice_start_index_len_fail_rt
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/slice/index.rs:52:5
   3: core::slice::index::slice_start_index_len_fail
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/slice/index.rs:40:9
   4: <rustc_metadata::locator::CrateLocator>::extract_one
   5: <rustc_metadata::locator::CrateLocator>::extract_lib
   6: <rustc_metadata::creader::CrateLoader>::load
   7: <rustc_metadata::creader::CrateLoader>::maybe_resolve_crate
   8: <rustc_resolve::Resolver>::early_resolve_ident_in_lexical_scope
   9: <rustc_resolve::Resolver>::resolve_path_with_ribs
  10: <rustc_resolve::Resolver as rustc_expand::base::ResolverExpand>::resolve_imports
  11: <rustc_expand::expand::MacroExpander>::fully_expand_fragment
  12: <rustc_expand::expand::MacroExpander>::expand_crate
  13: rustc_interface::passes::resolver_for_lowering
      [... omitted 1 frame ...]
  14: rustc_interface::interface::run_compiler::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.75.0 (82e1608df 2023-12-21) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debug-assertions=off

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

query stack during panic:
#0 [resolver_for_lowering] getting the resolver for lowering
end of query stack
error: could not compile `askama_parser` (lib)
warning: build failed, waiting for other jobs to finish...

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.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