Skip to content

Project fails (or takes long time) to compile on latest stable and nightly (hang/stackoverflow) #57735

Description

@bgourlie

While attempting to compile my application (or simply run cargo check), rustc will crash, with slightly different results depending on whether it's the stable or nightly branch.

OS: Windows 10 x64 version 1809 build 17763.253

stable toolchain

  • stable-x86_64-pc-windows-msvc
  • rustc 1.32.0 (9fda7c2 2019-01-16)

cargo check result: thread 'main' has overflowed its stack

Repro steps

  • Clone my project
  • cd rs-nes
  • git checkout remove-unstable-features
  • cargo check

nightly toolchain

  • nightly-x86_64-pc-windows-msvc
  • rustc 1.33.0-nightly (daa53a5 2019-01-17)

cargo check result: Process finished with exit code -1

Repro steps

  • Same as above, but on the master branch

Suspected cause

I've narrowed down the issue to a procedural macro that I've had no issues compiling in the past (on nightly). It generates a large match statement which made me think that this recent change may be related, but I have no evidence to support it other than the fact that it changes how the compiler behaves wrt large match statements.

It's also worth noting that I created the remove-unstable-features branch specifically to see if this was only an issue on nightly. It's possible that the error seen on stable is a manifestation of not using unstable features I had been relying on (box patterns, in this case).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

I-slowIssue: Problems and improvements with respect to performance of generated code.P-highHigh priorityregression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.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