diff --git a/Test/CMakeLists.txt b/Test/CMakeLists.txt index 09e5902..7e82711 100644 --- a/Test/CMakeLists.txt +++ b/Test/CMakeLists.txt @@ -139,6 +139,7 @@ addtest_variants("CXXExceptions" "CXXException.m;CXXException.cc" true) addtest_variants("ForwardDeclareProtocolAccess" "ForwardDeclareProtocolAccess.m;ForwardDeclareProtocol.m" true) if (ENABLE_OBJCXX) addtest_variants(ObjCXXEHInterop "ObjCXXEHInterop.mm;ObjCXXEHInterop.m" true) + addtest_variants(ObjCXXEHInterop_arc "ObjCXXEHInterop_arc.mm;ObjCXXEHInterop_arc.m" true) endif() # Some tests use enough memory that they fail on CI intermittently if they diff --git a/eh_personality.c b/eh_personality.c index 82d2c6e..3f0f8df 100644 --- a/eh_personality.c +++ b/eh_personality.c @@ -575,7 +575,8 @@ id objc_begin_catch(struct _Unwind_Exception *exceptionObject) { DEBUG_LOG("c++ catch\n"); td->current_exception_type = CXX; - return __cxa_begin_catch(exceptionObject); + id *obj = __cxa_begin_catch(exceptionObject); + return obj ? *obj : nil; } DEBUG_LOG("foreign exception catch\n"); // Box if we have a boxing function.