Skip to content

rustc OOM due to syntax error #77440

Closed
Closed
@crzysdrs

Description

@crzysdrs

It's just missing a comma after Self::Word but this ends up consuming all memory on my machine (and on the rust playground). It's worth noting that reducing the level of indentation also seems to sidestep this issue.

https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=16aba66ebd0c4177caa5498417f83878

Code

pub trait UNWArch {
    fn method(
                               addr: Self::Word
                               data: *mut c_void
    );
}

Meta

rustc --version --verbose:

$ rustc --version --verbose
rustc 1.46.0 (04488afe3 2020-08-24)
binary: rustc
commit-hash: 04488afe34512aa4c33566eb16d8c912a3ae04f9
commit-date: 2020-08-24
host: x86_64-unknown-linux-gnu
release: 1.46.0
LLVM version: 10.0

Error output

cargo build
   Compiling fail v0.1.0 (/home/crzysdrs/fail)
error: could not compile `fail`.

Caused by:
  process didn't exit successfully: `rustc --crate-name fail --edition=2018 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -Cembed-bitcode=no -C debuginfo=2 -C metadata=c63edfe5a60da69f -C extra-filename=-c63edfe5a60da69f --out-dir /home/crzysdrs/fail/target/debug/deps -C incremental=/home/crzysdrs/fail/target/debug/incremental -L dependency=/home/crzysdrs/fail/target/debug/deps` (signal: 9, SIGKILL: kill)
Backtrace

No backtrace, process terminated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-compilememIssue: Problems and improvements with respect to memory usage during compilation.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions