Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
libcxxabi/src/cxa_personality.cpp
Show First 20 Lines • Show All 616 Lines • ▼ Show 20 Lines | static void scan_eh_tab(scan_results &results, _Unwind_Action actions, | ||||||||
} | } | ||||||||
else // Neither _UA_SEARCH_PHASE nor _UA_CLEANUP_PHASE is set | else // Neither _UA_SEARCH_PHASE nor _UA_CLEANUP_PHASE is set | ||||||||
{ | { | ||||||||
// One of these should be set. | // One of these should be set. | ||||||||
// Client error | // Client error | ||||||||
results.reason = _URC_FATAL_PHASE1_ERROR; | results.reason = _URC_FATAL_PHASE1_ERROR; | ||||||||
return; | return; | ||||||||
} | } | ||||||||
// Start scan by getting exception table address | // Start scan by getting exception table address. | ||||||||
const uint8_t *lsda = (const uint8_t *)_Unwind_GetLanguageSpecificData(context); | const uint8_t *lsda = (const uint8_t *)_Unwind_GetLanguageSpecificData(context); | ||||||||
if (lsda == 0) | if (lsda == 0) | ||||||||
MaskRay: This is a regression on other platforms.
`results.languageSpecificData` is now nullptr.
| |||||||||
{ | { | ||||||||
// There is no exception table | // There is no exception table | ||||||||
results.reason = _URC_CONTINUE_UNWIND; | results.reason = _URC_CONTINUE_UNWIND; | ||||||||
return; | return; | ||||||||
} | } | ||||||||
results.languageSpecificData = lsda; | results.languageSpecificData = lsda; | ||||||||
#if defined(_AIX) | #if defined(_AIX) | ||||||||
uintptr_t base = _Unwind_GetDataRelBase(context); | uintptr_t base = _Unwind_GetDataRelBase(context); | ||||||||
▲ Show 20 Lines • Show All 271 Lines • ▼ Show 20 Lines | |||||||||
#if !defined(_LIBCXXABI_ARM_EHABI) | #if !defined(_LIBCXXABI_ARM_EHABI) | ||||||||
#if defined(__SEH__) && !defined(__USING_SJLJ_EXCEPTIONS__) | #if defined(__SEH__) && !defined(__USING_SJLJ_EXCEPTIONS__) | ||||||||
static _Unwind_Reason_Code __gxx_personality_imp | static _Unwind_Reason_Code __gxx_personality_imp | ||||||||
#else | #else | ||||||||
_LIBCXXABI_FUNC_VIS _Unwind_Reason_Code | _LIBCXXABI_FUNC_VIS _Unwind_Reason_Code | ||||||||
#ifdef __USING_SJLJ_EXCEPTIONS__ | #ifdef __USING_SJLJ_EXCEPTIONS__ | ||||||||
__gxx_personality_sj0 | __gxx_personality_sj0 | ||||||||
#elif defined(__MVS__) | |||||||||
__zos_cxx_personality_v2 | |||||||||
#else | #else | ||||||||
__gxx_personality_v0 | __gxx_personality_v0 | ||||||||
minor nit: This can be changed to #elif abhina.sreeskantharajan: minor nit: This can be changed to #elif | |||||||||
#endif | #endif | ||||||||
#endif | #endif | ||||||||
(int version, _Unwind_Action actions, uint64_t exceptionClass, | (int version, _Unwind_Action actions, uint64_t exceptionClass, | ||||||||
_Unwind_Exception* unwind_exception, _Unwind_Context* context) | _Unwind_Exception* unwind_exception, _Unwind_Context* context) | ||||||||
{ | { | ||||||||
if (version != 1 || unwind_exception == 0 || context == 0) | if (version != 1 || unwind_exception == 0 || context == 0) | ||||||||
return _URC_FATAL_PHASE1_ERROR; | return _URC_FATAL_PHASE1_ERROR; | ||||||||
▲ Show 20 Lines • Show All 191 Lines • ▼ Show 20 Lines | case _US_UNWIND_FRAME_STARTING: | ||||||||
} | } | ||||||||
// Install the context for the catching handler | // Install the context for the catching handler | ||||||||
set_registers(unwind_exception, context, results); | set_registers(unwind_exception, context, results); | ||||||||
return _URC_INSTALL_CONTEXT; | return _URC_INSTALL_CONTEXT; | ||||||||
} | } | ||||||||
// Either we didn't do a phase 1 search (due to forced unwinding), or | // Either we didn't do a phase 1 search (due to forced unwinding), or | ||||||||
// phase 1 reported no catching-handlers. | // phase 1 reported no catching-handlers. | ||||||||
minor nit: would be nice to fix the spacing muiez: minor nit: would be nice to fix the spacing
| |||||||||
// Search for a (non-catching) cleanup | // Search for a (non-catching) cleanup | ||||||||
if (is_force_unwinding) | if (is_force_unwinding) | ||||||||
scan_eh_tab( | scan_eh_tab( | ||||||||
results, | results, | ||||||||
static_cast<_Unwind_Action>(_UA_CLEANUP_PHASE | _UA_FORCE_UNWIND), | static_cast<_Unwind_Action>(_UA_CLEANUP_PHASE | _UA_FORCE_UNWIND), | ||||||||
native_exception, unwind_exception, context); | native_exception, unwind_exception, context); | ||||||||
else | else | ||||||||
scan_eh_tab(results, _UA_CLEANUP_PHASE, native_exception, | scan_eh_tab(results, _UA_CLEANUP_PHASE, native_exception, | ||||||||
▲ Show 20 Lines • Show All 181 Lines • Show Last 20 Lines |
This is a regression on other platforms.
results.languageSpecificData is now nullptr.