Skip to content

Reduce the Rust stack red zone #1509

Closed
Closed
@brson

Description

@brson

Right now the stack red zone is 20K on all platforms, which is ~20K larger than we would like. Several considerations:

  • The dynamic linker performs lazy binding in the red zone. Lazy binding can be turned off.
  • Landing pads call _Unwind_Resume in the red zone. We can probably come up with a scheme to switch stacks for this, but even better will be to implement our own unwinding.
  • There is some logging happening in the red zone that only shows up with RUST_LOG set appropritiately.
  • There is at least one upcall still doing a lot of work in the red zone.
  • We need to be able to handle signals in the red zone, haven't put any thought into it yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binariesA-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsC-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions