aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime/go-unwind.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2018-12-27 03:13:11 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2018-12-27 03:13:11 +0000
commit75e479a8b5afc311eafb7312a2f877166309d374 (patch)
tree4ad7e40b50094b49bec14206412ac794bae1b3fe /libgo/runtime/go-unwind.c
parent257992db897963535d4fdec0ccae4e3f3cb1086c (diff)
downloadgcc-75e479a8b5afc311eafb7312a2f877166309d374.zip
gcc-75e479a8b5afc311eafb7312a2f877166309d374.tar.gz
gcc-75e479a8b5afc311eafb7312a2f877166309d374.tar.bz2
runtime: on ARM32 EABI, don't get LSDA if compact model is used
On ARM32 EABI, when the "compact" unwinding model is used, it does not have standard LSDA and _Unwind_GetLanguageSpecificData will not return data that is parseable by us. Check this conditon before calling _Unwind_GetLanguageSpecificData. Fix ARM32 build. Reviewed-on: https://go-review.googlesource.com/c/155758 From-SVN: r267428
Diffstat (limited to 'libgo/runtime/go-unwind.c')
-rw-r--r--libgo/runtime/go-unwind.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libgo/runtime/go-unwind.c b/libgo/runtime/go-unwind.c
index f4bbfb6..388d7c7 100644
--- a/libgo/runtime/go-unwind.c
+++ b/libgo/runtime/go-unwind.c
@@ -646,6 +646,17 @@ findstackmaps (struct _Unwind_Context *context, _Unwind_Ptr *ip, _Unwind_Ptr *sp
_sleb128_t index;
int size;
+#ifdef __ARM_EABI_UNWINDER__
+ {
+ _Unwind_Control_Block *ucbp;
+ ucbp = (_Unwind_Control_Block *) _Unwind_GetGR (context, 12);
+ if (*ucbp->pr_cache.ehtp & (1u << 31))
+ // The "compact" model is used, with one of the predefined
+ // personality functions. It doesn't have standard LSDA.
+ return NOTFOUND_OK;
+ }
+#endif
+
language_specific_data = (const unsigned char *)
_Unwind_GetLanguageSpecificData (context);