[libcxx-commits] [PATCH] D108082: [libc++abi] Apply simplify scan_eh_tab to SjLj

Kazushi Marukawa via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Aug 14 19:12:30 PDT 2021


kaz7 created this revision.
kaz7 added reviewers: simoll, k-ishizaka, MaskRay.
kaz7 added a project: libc++abi.
kaz7 requested review of this revision.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++abi.

Previous "simplify scan_eh_tab" patch, https://reviews.llvm.org/D93190,
saves landingpad if and only if the target is not using SjLj exceptions.
However, the landingpad is used by SjLj exception handler also.  This
patch changes to set landingpad for both exception handlers.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D108082

Files:
  libcxxabi/src/cxa_personality.cpp


Index: libcxxabi/src/cxa_personality.cpp
===================================================================
--- libcxxabi/src/cxa_personality.cpp
+++ libcxxabi/src/cxa_personality.cpp
@@ -702,10 +702,10 @@
                 return;
             }
             landingPad = (uintptr_t)lpStart + landingPad;
-            results.landingPad = landingPad;
 #else  // __USING_SJLJ_EXCEPTIONS__
             ++landingPad;
 #endif // __USING_SJLJ_EXCEPTIONS__
+            results.landingPad = landingPad;
             if (actionEntry == 0)
             {
                 // Found a cleanup


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108082.366471.patch
Type: text/x-patch
Size: 585 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210815/a7a20b4d/attachment.bin>


More information about the libcxx-commits mailing list