diff options
author | Howard Hinnant <hhinnant@apple.com> | 2012-02-01 18:15:15 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2012-02-01 18:15:15 +0000 |
commit | 7ab185ea390a9ad39f512bd3e7d3ee6ea76812c8 (patch) | |
tree | e2899202b2818ff75fc2d4f627bb582105d7134c /src/cxa_handlers.cpp | |
parent | 29ae5fcdaedec7039c65355ef35955cbeacb61c1 (diff) |
Treat all exceptions except that the ones that this library throws as foreign. Even other C++ exceptions.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@149518 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'src/cxa_handlers.cpp')
-rw-r--r-- | src/cxa_handlers.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/cxa_handlers.cpp b/src/cxa_handlers.cpp index 015a06e..be43181 100644 --- a/src/cxa_handlers.cpp +++ b/src/cxa_handlers.cpp @@ -37,8 +37,9 @@ static void default_terminate_handler() { _Unwind_Exception* unwind_exception = reinterpret_cast<_Unwind_Exception*>(exception_header + 1) - 1; - bool native_exception = (unwind_exception->exception_class & get_language) == - (kOurExceptionClass & get_language); + bool native_exception = + (unwind_exception->exception_class & get_vendor_and_language) == + (kOurExceptionClass & get_vendor_and_language); if (native_exception) { void* thrown_object = @@ -167,8 +168,9 @@ terminate() _NOEXCEPT { _Unwind_Exception* unwind_exception = reinterpret_cast<_Unwind_Exception*>(exception_header + 1) - 1; - bool native_exception = (unwind_exception->exception_class & get_language) == - (kOurExceptionClass & get_language); + bool native_exception = + (unwind_exception->exception_class & get_vendor_and_language) == + (kOurExceptionClass & get_vendor_and_language); if (native_exception) { __cxa_exception* exception_header = (__cxa_exception*)(unwind_exception+1) - 1; |