diff options
| author | bors <bors@rust-lang.org> | 2020-01-02 07:04:20 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-01-02 07:04:20 +0000 |
| commit | 766fba3fdca8fe075c370a63d2f76f8407483af5 (patch) | |
| tree | c45eb7ac06aaf1a149391413b3217797ab19550c /src/libpanic_unwind | |
| parent | 68fdecd0ba798586d657af7a68c8128f5a67650b (diff) | |
| parent | 057ad39ea85a85f8137772f0e9c5064b8d1d808a (diff) | |
| download | rust-766fba3fdca8fe075c370a63d2f76f8407483af5.tar.gz rust-766fba3fdca8fe075c370a63d2f76f8407483af5.zip | |
Auto merge of #67779 - Amanieu:ehabi_fix, r=Mark-Simulacrum
Update the barrier cache during ARM EHABI unwinding Fixes #67242 r? @alexcrichton
Diffstat (limited to 'src/libpanic_unwind')
| -rw-r--r-- | src/libpanic_unwind/gcc.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libpanic_unwind/gcc.rs b/src/libpanic_unwind/gcc.rs index e5e8e805b6e..e612a63994b 100644 --- a/src/libpanic_unwind/gcc.rs +++ b/src/libpanic_unwind/gcc.rs @@ -188,7 +188,13 @@ cfg_if::cfg_if! { match eh_action { EHAction::None | EHAction::Cleanup(_) => return continue_unwind(exception_object, context), - EHAction::Catch(_) => return uw::_URC_HANDLER_FOUND, + EHAction::Catch(_) => { + // EHABI requires the personality routine to update the + // SP value in the barrier cache of the exception object. + (*exception_object).private[5] = + uw::_Unwind_GetGR(context, uw::UNWIND_SP_REG); + return uw::_URC_HANDLER_FOUND; + } EHAction::Terminate => return uw::_URC_FAILURE, } } else { |
