Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustc OOM due to syntax error #77440

Closed
crzysdrs opened this issue Oct 2, 2020 · 4 comments
Closed

rustc OOM due to syntax error #77440

crzysdrs opened this issue Oct 2, 2020 · 4 comments
Labels
C-bug Category: This is a bug. I-compilemem Issue: Problems and improvements with respect to memory usage during compilation. I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics. regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@crzysdrs
Copy link

crzysdrs commented Oct 2, 2020

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.

@crzysdrs crzysdrs added 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. labels Oct 2, 2020
@estebank
Copy link
Contributor

estebank commented Oct 2, 2020

This seems to have been fixed in nightly. It seems like it was introduced in 1.46 and will be present in 1.47, unless we indentify and a backport the fix present in nightly.

@estebank estebank added I-compilemem Issue: Problems and improvements with respect to memory usage during compilation. I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics. regression-from-stable-to-stable Performance or correctness regression from one stable version to another. and removed I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ labels Oct 2, 2020
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Oct 2, 2020
@jonas-schievink
Copy link
Contributor

This is #76597, fixed by #76598

@camelid
Copy link
Member

camelid commented Oct 2, 2020

Nominated the PR for beta backport so this issue does not appear in 1.47.

@LeSeulArtichaut LeSeulArtichaut removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Oct 2, 2020
@LeSeulArtichaut
Copy link
Contributor

Closing as this issue is fixed on nightly and the fix is now beta-accepted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-compilemem Issue: Problems and improvements with respect to memory usage during compilation. I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics. regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants