From adf40ba77cd633257e3957b6671e70cc1e0a0c50 Mon Sep 17 00:00:00 2001 From: Justin Cohen Date: Wed, 10 Feb 2021 13:47:57 -0500 Subject: [PATCH] ios: Handle libunwind.h header changes. Xcode 12.5 renamed __personality_routine to _Unwind_Personality_Fn in usr/include/unwind.h Bug: crashpad:31 Change-Id: I06a9cec7f94556dfd7c1f729069c93c61b4b0d9c Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2686121 Reviewed-by: Mark Mentovai Commit-Queue: Justin Cohen --- util/ios/exception_processor.mm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/util/ios/exception_processor.mm b/util/ios/exception_processor.mm index 616f9705..a8266811 100644 --- a/util/ios/exception_processor.mm +++ b/util/ios/exception_processor.mm @@ -14,6 +14,7 @@ #include "util/ios/exception_processor.h" +#include #import #include #include @@ -174,8 +175,13 @@ id ObjcExceptionPreprocessor(id exception) { } // Check to see if the handler is really an exception handler. - __personality_routine p = - reinterpret_cast<__personality_routine>(frame_info.handler); +#if defined(__IPHONE_14_5) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_14_5 + using personality_routine = _Unwind_Personality_Fn; +#else + using personality_routine = __personality_routine; +#endif + personality_routine p = + reinterpret_cast(frame_info.handler); // From 10.15.0 libunwind-35.4/src/UnwindLevel1.c. _Unwind_Reason_Code personalityResult = (*p)(