llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-libunwind Author: Daniel Kiss (DanielKristofKiss) <details> <summary>Changes</summary> Fixes #<!-- -->91144 --- Full diff: https://github.com/llvm/llvm-project/pull/98648.diff 1 Files Affected: - (modified) libunwind/src/UnwindCursor.hpp (+2-2) ``````````diff diff --git a/libunwind/src/UnwindCursor.hpp b/libunwind/src/UnwindCursor.hpp index 2ec60e4c123d5..1fa95b4ebee19 100644 --- a/libunwind/src/UnwindCursor.hpp +++ b/libunwind/src/UnwindCursor.hpp @@ -230,8 +230,8 @@ void DwarfFDECache<A>::iterateCacheEntries(void (*func)( } #endif // defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) - -#define arrayoffsetof(type, index, field) ((size_t)(&((type *)0)[index].field)) +#define arrayoffsetof(type, index, field) \ + (sizeof(type) * (index) + offsetof(type, field)) #if defined(_LIBUNWIND_SUPPORT_COMPACT_UNWIND) template <typename A> class UnwindSectionHeader { `````````` </details> https://github.com/llvm/llvm-project/pull/98648 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits