Closed
Description
This program
fn main() {
extern crate libc;
use libc::*;
}
seems to cause the compiler too loop endlessly in AST validation, allocating more and more memory:
$ rustc -Z time-passes oom.rs
warning: the option `Z` is unstable and should only be used on the nightly compiler, but it is currently accepted for backwards compatibility; this will soon change, see issue #31847 for more details
time: 0.000; rss: 31MB parsing
time: 0.000; rss: 31MB recursion limit
time: 0.000; rss: 31MB crate injection
time: 0.000; rss: 31MB plugin loading
time: 0.000; rss: 31MB plugin registration
time: 0.024; rss: 51MB expansion
time: 0.000; rss: 51MB maybe building test harness
time: 0.000; rss: 51MB maybe creating a macro crate
time: 0.000; rss: 51MB checking for inline asm in case the target doesn't support it
time: 0.000; rss: 51MB complete gated feature checking
time: 0.000; rss: 51MB collecting defs
time: 0.000; rss: 51MB early lint checks
time: 0.000; rss: 51MB AST validation
^C
$ rustc --version
rustc 1.13.0