Open
Description
Following 2 lines of Rust code can use more than 200 MB of memory to compile.
const L: usize = 1 << 25;
pub static S: [u32; L] = [1; L];
$ rustc --crate-type lib -Z time-passes test.rs | grep translation
time: 0.710; rss: 209MB translation
Reported on users.rust-lang.org post. See also #23600.
Metadata
Metadata
Assignees
Labels
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Category: An issue proposing an enhancement or a PR with one.Issue: Problems and improvements with respect to memory usage during compilation.Relevant to the compiler team, which will review and decide on the PR/issue.