third_party/libunwind: Fix unwind ABI

`resumeParameters` in `_Unwind_FunctionContext` should be "unwind words"
(typically 64-bit) instead of 32-bit.

This fix, along with the pending libcxxabi port, allows the first
binaries with exception handling to properly run.
This commit is contained in:
Trung Nguyen 2024-01-07 04:33:33 +00:00 committed by GitHub
parent b8e7fdd2f5
commit 3356605531
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -11,3 +11,6 @@ ORIGIN
Author: Tobias Hieta <tobias@hieta.se>
Date: Tue, 28 Nov 2023 09:52:28 +0100
LOCAL CHANGES
- Fixed `_Unwind_FunctionContext` struct to be ABI-compatible with code
generated by GCC.

View file

@ -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