diff options
author | Howard Hinnant <hhinnant@apple.com> | 2012-11-12 18:19:15 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2012-11-12 18:19:15 +0000 |
commit | 70abebed37f7598da01b71a52be9d8bbdf328ecc (patch) | |
tree | 6db1b34b1bdb1c228d94eac1c8152529592e420c /libcxxabi | |
parent | 467ab7b8d00e0a676527b0c7df3ad0d02a1be22d (diff) | |
download | bcm5719-llvm-70abebed37f7598da01b71a52be9d8bbdf328ecc.tar.gz bcm5719-llvm-70abebed37f7598da01b71a52be9d8bbdf328ecc.zip |
Wen-Han Gu: Fix for http://llvm.org/bugs/show_bug.cgi?id=14312 Exception Table out-of-range but still keep walking.
llvm-svn: 167733
Diffstat (limited to 'libcxxabi')
-rw-r--r-- | libcxxabi/src/cxa_personality.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libcxxabi/src/cxa_personality.cpp b/libcxxabi/src/cxa_personality.cpp index ea9905f352f..b2efe2aafab 100644 --- a/libcxxabi/src/cxa_personality.cpp +++ b/libcxxabi/src/cxa_personality.cpp @@ -552,7 +552,7 @@ scan_eh_tab(scan_results& results, _Unwind_Action actions, bool native_exception const uint8_t* callSiteTableEnd = callSiteTableStart + callSiteTableLength; const uint8_t* actionTableStart = callSiteTableEnd; const uint8_t* callSitePtr = callSiteTableStart; - while (true) + while (callSitePtr < callSiteTableEnd) { // There is one entry per call site. #if !__arm__ @@ -782,7 +782,11 @@ scan_eh_tab(scan_results& results, _Unwind_Action actions, bool native_exception call_terminate(native_exception, unwind_exception); } #endif // !__arm__ - } // there is no break out of this loop, only return + } // there might be some tricky cases which break out of this loop + + // It is possible that no eh table entry specify how to handle + // this exception. By spec, terminate it immediately. + call_terminate(native_exception, unwind_exception); } // public API |