Skip to content

Move EH personality functions to std#92845

Merged
bors merged 7 commits intorust-lang:masterfrom
Amanieu:std_personality
Aug 28, 2022
Merged

Move EH personality functions to std#92845
bors merged 7 commits intorust-lang:masterfrom
Amanieu:std_personality

Conversation

@Amanieu
Copy link
Member

@Amanieu Amanieu commented Jan 13, 2022

These were previously in the panic_unwind crate with dummy stubs in the
panic_abort crate. However it turns out that this is insufficient: we
still need a proper personality function even with -C panic=abort to
handle the following cases:

  1. extern "C-unwind" still needs to catch foreign exceptions with -C
    panic=abort to turn them into aborts. This requires landing pads and a
    personality function.

  2. ARM EHABI uses the personality function when creating backtraces.
    The dummy personality function in panic_abort was causing backtrace
    generation to get stuck in a loop since the personality function is
    responsible for advancing the unwind state to the next frame.

Fixes #41004

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

F-c_unwind `#![feature(c_unwind)]` merged-by-bors This PR was explicitly merged by bors. O-windows Operating system: Windows S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Endless loop on ARM while printing backtrace with -Cpanic=abort