summaryrefslogtreecommitdiff
path: root/src/cxa_personality.cpp
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2012-02-01 16:16:11 +0000
committerHoward Hinnant <hhinnant@apple.com>2012-02-01 16:16:11 +0000
commit3a1009ca976989bae6308d9bc49494d22c578e79 (patch)
tree58f5aec9d582fae31ef97a857e7e04be66ea191c /src/cxa_personality.cpp
parente162bf2dec6169ed06396af11eac19791e37957a (diff)
Move an error detector to a better place.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@149513 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'src/cxa_personality.cpp')
-rw-r--r--src/cxa_personality.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/cxa_personality.cpp b/src/cxa_personality.cpp
index ec033ab..be2573b 100644
--- a/src/cxa_personality.cpp
+++ b/src/cxa_personality.cpp
@@ -709,11 +709,6 @@ scan_eh_tab(scan_results& results, _Unwind_Action actions, bool native_exception
if (actionOffset == 0)
{
// End of action list, no matching handler or cleanup found
- // If this is a type 2 search, phase 1 told us we would find
- // a handler and we didn't. Something has gone terribly wrong.
- // Searches type 1 and 3 should return _URC_CONTINUE_UNWIND
- if (actions & _UA_HANDLER_FRAME)
- call_terminate(native_exception, unwind_exception);
results.reason = _URC_CONTINUE_UNWIND;
return;
}
@@ -829,6 +824,8 @@ __gxx_personality_v0(int version, _Unwind_Action actions, uint64_t exceptionClas
else
{
scan_eh_tab(results, actions, native_exception, unwind_exception, context);
+ if (results.reason != _URC_HANDLER_FOUND)
+ call_terminate(native_exception, unwind_exception);
}
_Unwind_SetGR(context, __builtin_eh_return_data_regno(0), (uintptr_t)unwind_exception);
_Unwind_SetGR(context, __builtin_eh_return_data_regno(1), results.ttypeIndex);