>From d62846a2b4586ad32a221eb03a8e3df50abd33cf Mon Sep 17 00:00:00 2001 From: Logan Chien Date: Fri, 7 Mar 2014 00:19:48 +0800 Subject: [PATCH] Fix ARM exception handling with _URC_CONTINUE_UNWIND. --- eh_personality.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/eh_personality.c b/eh_personality.c index b12d8b9..5308862 100644 --- a/eh_personality.c +++ b/eh_personality.c @@ -369,7 +369,10 @@ static inline _Unwind_Reason_Code internal_objc_personality(int version, DEBUG_LOG("LSDA: %p\n", lsda_addr); // No LSDA implies no landing pads - try the next frame - if (0 == lsda_addr) { return _URC_CONTINUE_UNWIND; } + if (0 == lsda_addr) + { + return continueUnwinding(exceptionObject, context); + } // These two variables define how the exception will be handled. struct dwarf_eh_action action = {0}; @@ -393,7 +396,7 @@ static inline _Unwind_Reason_Code internal_objc_personality(int version, DEBUG_LOG("Found handler! %d\n", handler); return _URC_HANDLER_FOUND; } - return _URC_CONTINUE_UNWIND; + return continueUnwinding(exceptionObject, context); } DEBUG_LOG("Phase 2: Fight!\n"); @@ -407,7 +410,7 @@ static inline _Unwind_Reason_Code internal_objc_personality(int version, // If there's no cleanup here, continue unwinding. if (0 == action.landing_pad) { - return _URC_CONTINUE_UNWIND; + return continueUnwinding(exceptionObject, context); } handler_type handler = check_action_record(context, foreignException, &lsda, action.action_record, thrown_class, &selector); @@ -418,7 +421,7 @@ static inline _Unwind_Reason_Code internal_objc_personality(int version, if (handler != handler_cleanup) { DEBUG_LOG("Ignoring handler! %d\n",handler); - return _URC_CONTINUE_UNWIND; + return continueUnwinding(exceptionObject, context); } DEBUG_LOG("Installing cleanup...\n"); // If there is a cleanup, we need to return the exception structure -- 1.7.9.5