rustc
exhausts all memory on a trivially wrong program (seems to be fixed on nightly?)
#122314
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.
I found a case where apparently, trying to construct a struct the wrong way leads to the compiler very quickly exhausting all memory.
I observed it to take up 10G mem +10G of swap in a few seconds on my system.
The issue seems to be fixed on nightly, but I was unsure if I should still open a ticket about it.
Code
This scenario seems to require an external crate, so the minimum reproduction I can manage is a pair of
lib.rs
andmain.rs
:Alternatively see https://github.com/Kimundi/rustc_bug_2024_quick_oom
To reproduce, run:
...and monitor memory consumption.
Meta
rustc --version --verbose
:Error output
I can not reproduce it in the MRE, but sometimes I get this error instead of the endless resource exhaustion:
Fixed on Nightly
The issue seems to be fixed on nightly:
rustc +nightly --version --verbose
:The text was updated successfully, but these errors were encountered: