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

ICE in allocator_api #82089

Closed
delamonpansie opened this issue Feb 14, 2021 · 2 comments
Closed

ICE in allocator_api #82089

delamonpansie opened this issue Feb 14, 2021 · 2 comments
Labels
A-allocators Area: Custom and system allocators C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example 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

@delamonpansie
Copy link

Code

#![feature(allocator_api)]
use bumpalo::Bump;
fn main() {
    let bump = Bump::new();
    let _ : Vec<Box<i64, &Bump>, &Bump> = Vec::new_in(&bump);
}

Meta

rustc --version --verbose:

rustc 1.52.0-nightly (3f5aee2d5 2021-02-12)
binary: rustc
commit-hash: 3f5aee2d5241139d808f4fdece0026603489afd1
commit-date: 2021-02-12
host: x86_64-unknown-linux-gnu
release: 1.52.0-nightly
LLVM version: 11.0.1

Error output

thread 'rustc' panicked at 'assertion failed: i < this.fields.count()', /rustc/3f5aee2d5241139d808f4fdece0026603489afd1/compiler/rustc_middle/src/ty/layout.rs:2191:21
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://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.52.0-nightly (3f5aee2d5 2021-02-12) running on x86_64-unknown-linux-gnu

note: compiler flags: -C embed-bitcode=no -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
Backtrace

thread 'rustc' panicked at 'assertion failed: i < this.fields.count()', /rustc/3f5aee2d5241139d808f4fdece0026603489afd1/compiler/rustc_middle/src/ty/layout.rs:2191:21
stack backtrace:
   0: rust_begin_unwind
             at /rustc/3f5aee2d5241139d808f4fdece0026603489afd1/library/std/src/panicking.rs:493:5
   1: core::panicking::panic_fmt
             at /rustc/3f5aee2d5241139d808f4fdece0026603489afd1/library/core/src/panicking.rs:92:14
   2: core::panicking::panic
             at /rustc/3f5aee2d5241139d808f4fdece0026603489afd1/library/core/src/panicking.rs:50:5
   3: rustc_middle::ty::layout::<impl rustc_target::abi::TyAndLayoutMethods<C> for &rustc_middle::ty::TyS>::field::ty_and_layout_kind
   4: <rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS> as rustc_codegen_llvm::type_of::LayoutLlvmExt>::scalar_pair_element_llvm_type
   5: <rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS> as rustc_codegen_llvm::type_of::LayoutLlvmExt>::scalar_pair_element_llvm_type
   6: rustc_codegen_llvm::type_of::uncached_llvm_type
   7: <rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS> as rustc_codegen_llvm::type_of::LayoutLlvmExt>::llvm_type
   8: <rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS> as rustc_codegen_llvm::type_of::LayoutLlvmExt>::llvm_type
   9: <rustc_target::abi::call::FnAbi<&rustc_middle::ty::TyS> as rustc_codegen_llvm::abi::FnAbiLlvmExt>::llvm_type
  10: rustc_codegen_llvm::mono_item::<impl rustc_codegen_ssa::traits::declare::PreDefineMethods for rustc_codegen_llvm::context::CodegenCx>::predefine_fn
  11: rustc_codegen_llvm::base::compile_codegen_unit::module_codegen
  12: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  13: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
  14: rustc_codegen_llvm::base::compile_codegen_unit
  15: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
  16: rustc_session::utils::<impl rustc_session::session::Session>::time
  17: rustc_interface::queries::Queries::ongoing_codegen
  18: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  19: rustc_span::with_source_map
  20: scoped_tls::ScopedKey<T>::set
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/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.52.0-nightly (3f5aee2d5 2021-02-12) running on x86_64-unknown-linux-gnu

note: compiler flags: -C embed-bitcode=no -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

@delamonpansie delamonpansie 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 Feb 14, 2021
@osa1
Copy link
Contributor

osa1 commented Feb 14, 2021

Probably a duplicate of #81246 and #78459.

@JohnTitor JohnTitor added A-allocators Area: Custom and system allocators E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example labels Mar 16, 2021
@jyn514
Copy link
Member

jyn514 commented Mar 19, 2021

Closing since this is a duplicate.

@jyn514 jyn514 closed this as completed Mar 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-allocators Area: Custom and system allocators C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example 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

4 participants