Skip to content

Provide more information about call stack in case of stack overflow during compilation #64929

@olegnn

Description

@olegnn

Compiling code with custom macros

RUST_BACKTRACE=full cargo build

results in

thread 'rustc' has overflowed its stack
fatal runtime error: stack overflow
error: could not compile `tests`.
Caused by:
  process didn't exit successfully: `rustc --edition=2018 --crate-name tests src/main.rs --color always --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=ae3074fbe56a7184 -C extra-filename=-ae3074fbe56a7184 ` (signal: 6, SIGABRT: process abort signal)

That's full message with no information about place in code which caused a problem and with no call stack even if RUST_BACKTRACE=full set.
It would be better if compiler could handle this type of exceptions and provide some debug information (call stack at least).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions