Skip to content
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

Internal compiler error: unexpected panic #89160

Closed
robertazzopardi opened this issue Sep 21, 2021 · 2 comments
Closed

Internal compiler error: unexpected panic #89160

robertazzopardi opened this issue Sep 21, 2021 · 2 comments
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@robertazzopardi
Copy link

Happened today trying to build a current project of mine. Creating and building a new project works on stable, but produces the following error on nightly regardless of whether it is a fresh project or not.

Code

fn main() {
    println!("Hello, world!");
}

Meta

rustc --version --verbose:

rustc 1.57.0-nightly (5ecc8ad84 2021-09-19)
binary: rustc
commit-hash: 5ecc8ad8462574354a55162a0c16b10eb95e3e70
commit-date: 2021-09-19
host: aarch64-apple-darwin
release: 1.57.0-nightly
LLVM version: 13.0.0

Error output

thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: "Provided allocation has wrong size for slot count 131072"', compiler/rustc_metadata/src/rmeta/decoder.rs:263:29
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

error: internal compiler error: unexpected panic

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

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

note: rustc 1.57.0-nightly (5ecc8ad84 2021-09-19) running on aarch64-apple-darwin

note: compiler flags: -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -C incremental --crate-type bin

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

query stack during panic:
end of query stack
error: could not compile `hello_world`
Backtrace

stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: rustc_metadata::rmeta::decoder::CrateMetadata::new
   4: rustc_metadata::creader::CrateLoader::maybe_resolve_crate
   5: rustc_metadata::creader::CrateLoader::maybe_resolve_crate
   6: rustc_metadata::creader::CrateLoader::process_extern_crate
   7: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor as rustc_ast::visit::Visitor>::visit_item
   8: rustc_ast::visit::walk_item
   9: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor as rustc_ast::visit::Visitor>::visit_item
  10: rustc_expand::expand::AstFragment::visit_with
  11: rustc_resolve::macros::<impl rustc_expand::base::ResolverExpand for rustc_resolve::Resolver>::visit_ast_fragment_with_placeholders
  12: rustc_expand::expand::MacroExpander::collect_invocations
  13: rustc_expand::expand::MacroExpander::fully_expand_fragment
  14: rustc_expand::expand::MacroExpander::expand_crate
  15: rustc_session::utils::<impl rustc_session::session::Session>::time
  16: rustc_interface::passes::configure_and_expand
  17: rustc_interface::queries::Queries::expansion
  18: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  19: rustc_span::with_source_map
  20: scoped_tls::ScopedKey<T>::set

@robertazzopardi robertazzopardi added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 21, 2021
@PatchMixolydic
Copy link
Contributor

Seems like a duplicate of #89085

@robertazzopardi
Copy link
Author

Yes and has been fixed in

nightly-aarch64-apple-darwin unchanged - rustc 1.57.0-nightly (ac2d9fc50 2021-09-21)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants