Skip to content

remove segmented stack preludes or at least make them optional #11871

Closed
@thestinger

Description

@thestinger

This is unable to truly provide safety since nearly all Rust code makes calls into native libraries. These libraries do not have the segmented stack preludes. The libraries may have been built with GCC using -fcheck-stack.

At the moment, Rust is unable to build a binary without the dependency on segmented stacks. Rust installs neither llc or clang, so it provides no way to compile a freestanding binary at all. Using llc is not ideal since it uses a weird optimization stack, and clang isn't built at all (clang 3.3 or 3.4 are not defined to work on the bytecode from trunk).
#10781 covers provide full stack safety via a guard page with the assumption that libraries are compiled with -fcheck-stack or do not have large uninitialized stack frames. However, there really needs to be a way to disable this now as it prevents using rustc to compile any freestanding/runtimeless code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions