summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2022-04-27 13:15:09 +0000
committerEd Maste <emaste@FreeBSD.org>2022-04-27 16:05:34 +0000
commit346f0084ba726f5b4640e0624c6f7e0df2622d54 (patch)
tree0d9ea3aa2ac2367143b6d4e77fc6ac472d1ff304
parentd33bf8c50bd7359e75732aab0b905f9ba7f13e2c (diff)
-rw-r--r--contrib/libcxxrt/exception.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/libcxxrt/exception.cc b/contrib/libcxxrt/exception.cc
index 0fb26ddb4ed2..f2b5fc0808ac 100644
--- a/contrib/libcxxrt/exception.cc
+++ b/contrib/libcxxrt/exception.cc
@@ -196,6 +196,7 @@ struct __cxa_thread_info
struct __cxa_dependent_exception
{
#if __LP64__
+ void *reserve;
void *primaryException;
#endif
std::type_info *exceptionType;
@@ -218,6 +219,17 @@ struct __cxa_dependent_exception
#endif
_Unwind_Exception unwindHeader;
};
+static_assert(sizeof(__cxa_exception) == sizeof(__cxa_dependent_exception),
+ "__cxa_exception and __cxa_dependent_exception should have the same size");
+static_assert(offsetof(__cxa_exception, referenceCount) ==
+ offsetof(__cxa_dependent_exception, primaryException),
+ "referenceCount and primaryException should have the same offset");
+static_assert(offsetof(__cxa_exception, unwindHeader) ==
+ offsetof(__cxa_dependent_exception, unwindHeader),
+ "unwindHeader fields should have the same offset");
+static_assert(offsetof(__cxa_dependent_exception, unwindHeader) ==
+ offsetof(__cxa_dependent_exception, adjustedPtr) + 8,
+ "there should be no padding before unwindHeader");
namespace std