about summary refs log tree commit diff
path: root/library/std/src/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorkatelyn a. martin <me+rustlang@katelyn.world>2020-09-10 13:38:39 -0400
committerkatelyn a. martin <me+rustlang@katelyn.world>2021-03-09 14:38:29 -0500
commit0f33e9f2816358a4d8afd02af35bd23a4d6d0857 (patch)
tree289cdca5b191592de5c16a8cadf88ee4c31849c7 /library/std/src/sys/unix/stack_overflow.rs
parentdf45c579de97777617b6f12c77a5e6224f54c897 (diff)
downloadrust-0f33e9f2816358a4d8afd02af35bd23a4d6d0857.tar.gz
rust-0f33e9f2816358a4d8afd02af35bd23a4d6d0857.zip
implement unwinding abi's (RFC 2945)
 ### Changes

    This commit implements unwind ABI's, specified in RFC 2945.

    We adjust the `rustc_middle::ty::layout::fn_can_unwind` function,
    used to compute whether or not a `FnAbi` object represents a
    function that should be able to unwind when `panic=unwind` is in
    use.

    Changes are also made to
    `rustc_mir_build::build::should_abort_on_panic` so that the
    function ABI is used to determind whether it should abort, assuming
    that the `panic=unwind` strategy is being used, and no explicit
    unwind attribute was provided.

 ### Tests

    Unit tests, checking that the behavior is correct for `C-unwind`,
    `stdcall-unwind`, `system-unwind`, and `thiscall-unwind`, are
    included. These alternative `unwind` ABI strings are specified in
    RFC 2945, in the "_Other `unwind` ABI strings_" section.

    Additionally, a test case is included to assert that the LLVM IR
    generated for an external function defined with the `C-unwind` ABI
    will be appropriately labeled with the `nounwind` LLVM attribute
    when the `panic=abort` compilation flag is used.

 ### Ignore Directives

    This commit uses `ignore-*` directives in two of our `*-unwind` ABI
    test cases.

    Specifically, the `stdcall-unwind` and `thiscall-unwind` test cases
    ignore architectures that do not support `stdcall` and `thiscall`,
    respectively.

    These directives are cribbed from
    `src/test/ui/c-variadic/variadic-ffi-1.rs` for `stdcall`, and
    `src/test/ui/extern/extern-thiscall.rs` for `thiscall`.
Diffstat (limited to 'library/std/src/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions