diff --git a/third_party/libunwind/README.cosmo b/third_party/libunwind/README.cosmo index 3524d2a39..e74e838c3 100644 --- a/third_party/libunwind/README.cosmo +++ b/third_party/libunwind/README.cosmo @@ -11,3 +11,6 @@ ORIGIN Author: Tobias Hieta Date: Tue, 28 Nov 2023 09:52:28 +0100 +LOCAL CHANGES + - Fixed `_Unwind_FunctionContext` struct to be ABI-compatible with code + generated by GCC. diff --git a/third_party/libunwind/Unwind-sjlj.c b/third_party/libunwind/Unwind-sjlj.c index ae8b73351..514358e5b 100644 --- a/third_party/libunwind/Unwind-sjlj.c +++ b/third_party/libunwind/Unwind-sjlj.c @@ -28,6 +28,8 @@ #if defined(_LIBUNWIND_BUILD_SJLJ_APIS) +typedef uintptr_t _Unwind_Word __attribute__((__mode__(__unwind_word__))); + struct _Unwind_FunctionContext { // next function in stack of handlers struct _Unwind_FunctionContext *prev; @@ -47,7 +49,7 @@ struct _Unwind_FunctionContext { uint32_t resumeLocation; // set by personality handler to be parameters passed to landing pad function - uint32_t resumeParameters[4]; + _Unwind_Word resumeParameters[4]; #endif // set by calling function before registering