Skip to content

Macros cause rustc to stack overflow  #370

Closed
@vcfxb

Description

@vcfxb

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions