generic const items: polymorphically recursive consts lead to compiler stack overflow #114192
Labels
C-bug
Category: This is a bug.
F-generic_const_items
`#![feature(generic_const_items)]`
I-crash
Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
requires-incomplete-features
This issue requires the use of incomplete features.
S-bug-has-test
Status: This bug is tracked inside the repo by a `known-bug` test.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Uh oh!
There was an error while loading. Please reload this page.
I expected the following code to lead to an error (overflow, const eval, or cycle):
Instead, the memory & CPU usage of the compiler quickly grew until the OOM killer terminated the process (I presume this to be a stack overflow turned into an OOM situation due to the use of
ensure_sufficient_stack
somewhere which causes stacks to be allocated on the heap).Debug builds of the compiler crash immediately with a segmentation fault.
Running rustc with GDB yields (which merely looks like a symptom):
(14,000 line backtrace not included in this issue ^^)
Corresponding UI test:
tests/ui/generic-const-items/recursive.rs
(known-bug
,ignore-test
).Meta
rustc -Vv
@rustbot label C-bug T-compiler I-crash requires-incomplete-features F-generic_const_items
@rustbot claim
The text was updated successfully, but these errors were encountered: