llvm-project/libcxxabi
Fangrui Song cfe9ccbddd [libc++abi] Simplify scan_eh_tab
1.
All `_URC_HANDLER_FOUND` return values need to set `landingPad`
and its value does not matter for `_URC_CONTINUE_UNWIND`. So we
can always set `landingPad` to unify code.

2.
For an exception specification (`ttypeIndex < 0`), we can check `_UA_FORCE_UNWIND` first.

3.
The so-called type 3 search (`actions & _UA_CLEANUP_PHASE && !(actions & _UA_HANDLER_FRAME)`)
is actually conceptually wrong.  For a catch handler or an unmatched dynamic
exception specification, `_UA_HANDLER_FOUND` should be returned immediately.  It
still appeared to work because the `ttypeIndex==0` case would return
`_UA_HANDLER_FOUND` at a later time.

This patch fixes the conceptual error and simplifies the code by handling type 3
the same way as type 2 (which is also what libsupc++ does).
The only difference between phase 1 and phase 2 is what to do with a cleanup
(`actionEntry==0`, or a `ttypeIndex==0` is found in the action record chain):
phase 1 returns `_URC_CONTINUE_UNWIND` while phase 2 returns `_URC_HANDLER_FOUND`.

Reviewed By: #libc_abi, compnerd

Differential Revision: https://reviews.llvm.org/D93190
2021-01-21 15:19:23 -08:00
..
cmake [libcxxabi,libunwind] support running tests in standalone mode 2020-10-14 09:10:20 +02:00
fuzz
include [libcxxabi] Define _LIBCXXABI_WEAK properly for mingw compilers 2020-10-22 09:00:57 +03:00
lib [libc++/abi] Revert "[libc++] Move the weak symbols list to libc++abi" 2020-10-05 11:42:13 -04:00
src [libc++abi] Simplify scan_eh_tab 2021-01-21 15:19:23 -08:00
test [libc++] Introduce an indirection to create threads in the test suite 2020-11-27 11:54:19 -05:00
www [libc++abi] Simplify the logic for finding libc++ from libc++abi 2020-06-11 15:08:01 -04:00
.clang-format
.gitignore
CMakeLists.txt [libc++abi] Add an option to avoid demangling in terminate. 2021-01-21 13:32:29 -08:00
CREDITS.TXT Try again, this time with the correct address 2017-12-29 19:26:28 +00:00
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00