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

Macros cause rustc to stack overflow #370

Closed
vcfxb opened this issue Jun 22, 2021 · 2 comments
Closed

Macros cause rustc to stack overflow #370

vcfxb opened this issue Jun 22, 2021 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@vcfxb
Copy link

vcfxb commented Jun 22, 2021

example source code

I made an issue on the rust repository as well, but I figured I'd mention it here too -- for APIs with large schemas or queries that use large/deep input types, rustc to overflow:

$ RUST_BACKTRACE=1 cargo +stable build
   Compiling rustc-stack-overflow v0.1.0 (/home/antonia/Desktop/Projects/rustc-stack-overflow)

thread 'rustc' has overflowed its stack
fatal runtime error: stack overflow
error: could not compile `rustc-stack-overflow`

Caused by:
  process didn't exit successfully: `rustc --crate-name rustc_stack_overflow --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=20441d2a475a112e -C extra-filename=-20441d2a475a112e --out-dir /home/antonia/Desktop/Projects/rustc-stack-overflow/target/debug/deps -C incremental=/home/antonia/Desktop/Projects/rustc-stack-overflow/target/debug/incremental -L dependency=/home/antonia/Desktop/Projects/rustc-stack-overflow/target/debug/deps --extern graphql_client=/home/antonia/Desktop/Projects/rustc-stack-overflow/target/debug/deps/libgraphql_client-63af0a9b9458de3b.rlib` (signal: 6, SIGABRT: process abort signal)
@vcfxb
Copy link
Author

vcfxb commented Jun 23, 2021

Based on discussion on rust-lang/rust#86556 it seems that
this function recurses infinitely in this case.

@tomhoule tomhoule added bug Something isn't working help wanted Extra attention is needed labels Jun 25, 2021
@vcfxb
Copy link
Author

vcfxb commented Jul 5, 2021

This appears to be fixed in the 0.10.0 release. Closing issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants