Closed
Description
I tried this code:
fn main() {
(if foobar)
}
$ ulimit -v 2000000 # 2 GB
$ rustc main.rs
rustc
first outputs some error messages and then hangs up trying to allocate a large amount of memory.
error: expected `{`, found `)`
--> main.rs:2:15
|
2 | (if foobar)
| -- ^ expected `{`
| |
| this `if` statement has a condition, but no block
error: expected expression, found `<eof>`
--> main.rs:3:1
|
3 | }
| ^ expected expression
memory allocation of 1610612736 bytes failedAborted (core dumped)
Meta
rustc --version --verbose
:
rustc 1.35.0 (3c235d560 2019-05-20)
binary: rustc
commit-hash: 3c235d5600393dfe6c36eeed34042efad8d4f26e
commit-date: 2019-05-20
host: x86_64-unknown-linux-gnu
release: 1.35.0
LLVM version: 8.0
Metadata
Metadata
Labels
Category: This is a bug.Issue: Problems and improvements with respect to memory usage during compilation.Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.Medium priorityRelevant to the compiler team, which will review and decide on the PR/issue.Performance or correctness regression from one stable version to another.