[libunwind] Increase the external value of _LIBUNWIND_CURSOR_SIZE for SEH/x86_64
authorMartin Storsjö <martin@martin.st>
Wed, 5 Apr 2023 11:12:24 +0000 (14:12 +0300)
committerMartin Storsjö <martin@martin.st>
Mon, 10 Apr 2023 21:00:30 +0000 (00:00 +0300)
For x86_64 Windows targets (that use SEH), _LIBUNWIND_CURSOR_SIZE
is 204; this fixes corruption in test cases that include libunwind.h
without manually defining _LIBUNWIND_IS_NATIVE_ONLY.

If the libunwind.h header is included without defining
_LIBUNWIND_IS_NATIVE_ONLY (like in the libunwind test cases), the
sizes are set to accommodate the maximum possible cursors and
contexts.

(Alternatively, __libunwind_config.h should be changed to default
to native unwinding unless cross unwinding has been requested.
Cross unwinding isn't implemented as far as I know anyway.)

Differential Revision: https://reviews.llvm.org/D147634

libunwind/include/__libunwind_config.h

index a4e1a36..a317a36 100644 (file)
 # define _LIBUNWIND_TARGET_S390X 1
  #define _LIBUNWIND_TARGET_LOONGARCH 1
 # define _LIBUNWIND_CONTEXT_SIZE 167
-# define _LIBUNWIND_CURSOR_SIZE 179
+# define _LIBUNWIND_CURSOR_SIZE 204
 # define _LIBUNWIND_HIGHEST_DWARF_REGISTER 287
 #endif // _LIBUNWIND_IS_NATIVE_ONLY