Skip to content

mgca: stack overflow #141882

Open
Open
@matthiaskrgr

Description

@matthiaskrgr

Code

#![feature(min_generic_const_args)]

fn combinator<T, const S: usize>() -> [T; combinator] {}

fn main() {}

Meta

rustc --version --verbose:

rustc 1.89.0-nightly (99e7c15e8 2025-06-01)
binary: rustc
commit-hash: 99e7c15e81385b38a8186b51edc4577d5d7b5bdd
commit-date: 2025-06-01
host: x86_64-unknown-linux-gnu
release: 1.89.0-nightly
LLVM version: 20.1.5
Backtrace

warning: the feature `min_generic_const_args` is incomplete and may not be safe to use and/or cause compiler crashes
 --> a.rs:1:12
  |
1 | #![feature(min_generic_const_args)]
  |            ^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #132980 <https://github.com/rust-lang/rust/issues/132980> for more information
  = note: `#[warn(incomplete_features)]` on by default

error: rustc interrupted by SIGSEGV, printing backtrace

/home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-ef85d6b35b33584e.so(+0x3c1dfff) [0x717a1ae1dfff]
/usr/lib/libc.so.6(+0x3def0) [0x717a1704def0]
/home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-ef85d6b35b33584e.so(_RNvMs4_NtNtCsc3QC8KlvVjh_12rustc_middle2ty7contextNtB5_13CtxtInterners9intern_ty+0x11) [0x717a1c435ca1]
/home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-ef85d6b35b33584e.so(+0x534ab88) [0x717a1c54ab88]
/home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-ef85d6b35b33584e.so(+0x5385ca1) [0x717a1c585ca1]
/home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-ef85d6b35b33584e.so(_RNvXs_NtNtCsa00mjtcx9Fe_21rustc_trait_selection6traits2wfNtB4_12WfPredicatesINtNtCsY8QKBXQKI2_13rustc_type_ir5visit11TypeVisitorNtNtNtCsc3QC8KlvVjh_12rustc_middle2ty7context6TyCtxtE8visit_ty+0x3851) [0x717a1cd3bbd5]

### cycle encountered after 6 frames with period 7
/home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-ef85d6b35b33584e.so(_RNvXs_NtNtCsa00mjtcx9Fe_21rustc_trait_selection6traits2wfNtB4_12WfPredicatesINtNtCsY8QKBXQKI2_13rustc_type_ir5visit11TypeVisitorNtNtNtCsc3QC8KlvVjh_12rustc_middle2ty7context6TyCtxtE8visit_ty+0x386e) [0x717a1cd3bbf2]
/home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-ef85d6b35b33584e.so(_RNvXs_NtNtCsa00mjtcx9Fe_21rustc_trait_selection6traits2wfNtB4_12WfPredicatesINtNtCsY8QKBXQKI2_13rustc_type_ir5visit11TypeVisitorNtNtNtCsc3QC8KlvVjh_12rustc_middle2ty7context6TyCtxtE8visit_ty+0x386e) [0x717a1cd3bbf2]
/home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-ef85d6b35b33584e.so(_RNvXs_NtNtCsa00mjtcx9Fe_21rustc_trait_selection6traits2wfNtB4_12WfPredicatesINtNtCsY8QKBXQKI2_13rustc_type_ir5visit11TypeVisitorNtNtNtCsc3QC8KlvVjh_12rustc_middle2ty7context6TyCtxtE8visit_ty+0x386e) [0x717a1cd3bbf2]
/home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-ef85d6b35b33584e.so(_RNvXs_NtNtCsa00mjtcx9Fe_21rustc_trait_selection6traits2wfNtB4_12WfPredicatesINtNtCsY8QKBXQKI2_13rustc_type_ir5visit11TypeVisitorNtNtNtCsc3QC8KlvVjh_12rustc_middle2ty7context6TyCtxtE8visit_ty+0x386e) [0x717a1cd3bbf2]
/home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-ef85d6b35b33584e.so(_RNvXs_NtNtCsa00mjtcx9Fe_21rustc_trait_selection6traits2wfNtB4_12WfPredicatesINtNtCsY8QKBXQKI2_13rustc_type_ir5visit11TypeVisitorNtNtNtCsc3QC8KlvVjh_12rustc_middle2ty7context6TyCtxtE8visit_ty+0x386e) [0x717a1cd3bbf2]
/home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-ef85d6b35b33584e.so(_RNvXs_NtNtCsa00mjtcx9Fe_21rustc_trait_selection6traits2wfNtB4_12WfPredicatesINtNtCsY8QKBXQKI2_13rustc_type_ir5visit11TypeVisitorNtNtNtCsc3QC8KlvVjh_12rustc_middle2ty7context6TyCtxtE8visit_ty+0x386e) [0x717a1cd3bbf2]
/home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-ef85d6b35b33584e.so(_RNvXs_NtNtCsa00mjtcx9Fe_21rustc_trait_selection6traits2wfNtB4_12WfPredicatesINtNtCsY8QKBXQKI2_13rustc_type_ir5visit11TypeVisitorNtNtNtCsc3QC8KlvVjh_12rustc_middle2ty7context6TyCtxtE8visit_ty+0x386e) [0x717a1cd3bbf2]
### recursed 35 times

/home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-ef85d6b35b33584e.so(_RNvXs_NtNtCsa00mjtcx9Fe_21rustc_trait_selection6traits2wfNtB4_12WfPredicatesINtNtCsY8QKBXQKI2_13rustc_type_ir5visit11TypeVisitorNtNtNtCsc3QC8KlvVjh_12rustc_middle2ty7context6TyCtxtE8visit_ty+0x386e) [0x717a1cd3bbf2]
/home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-ef85d6b35b33584e.so(_RNvXs_NtNtCsa00mjtcx9Fe_21rustc_trait_selection6traits2wfNtB4_12WfPredicatesINtNtCsY8QKBXQKI2_13rustc_type_ir5visit11TypeVisitorNtNtNtCsc3QC8KlvVjh_12rustc_middle2ty7context6TyCtxtE8visit_ty+0x386e) [0x717a1cd3bbf2]
/home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-ef85d6b35b33584e.so(_RNvXs_NtNtCsa00mjtcx9Fe_21rustc_trait_selection6traits2wfNtB4_12WfPredicatesINtNtCsY8QKBXQKI2_13rustc_type_ir5visit11TypeVisitorNtNtNtCsc3QC8KlvVjh_12rustc_middle2ty7context6TyCtxtE8visit_ty+0x386e) [0x717a1cd3bbf2]
/home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-ef85d6b35b33584e.so(_RNvXs_NtNtCsa00mjtcx9Fe_21rustc_trait_selection6traits2wfNtB4_12WfPredicatesINtNtCsY8QKBXQKI2_13rustc_type_ir5visit11TypeVisitorNtNtNtCsc3QC8KlvVjh_12rustc_middle2ty7context6TyCtxtE8visit_ty+0x386e) [0x717a1cd3bbf2]
/home/matthias/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-ef85d6b35b33584e.so(_RNvXs_NtNtCsa00mjtcx9Fe_21rustc_trait_selection6traits2wfNtB4_12WfPredicatesINtNtCsY8QKBXQKI2_13rustc_type_ir5visit11TypeVisitorNtNtNtCsc3QC8KlvVjh_12rustc_middle2ty7context6TyCtxtE8visit_ty+0x386e) [0x717a1cd3bbf2]

note: rustc unexpectedly overflowed its stack! this is a bug
note: maximum backtrace depth reached, frames may have been lost
note: we would appreciate a report at https://github.com/rust-lang/rust
help: you can increase rustc's stack size by setting RUST_MIN_STACK=16777216
note: backtrace dumped due to SIGSEGV! resuming signal
[2]    3965178 segmentation fault  rustc a.rs

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.F-min_generic_const_args`#![feature(min_generic_const_args)]`I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.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