[libunwind] Undefined behaviour pointer arithmetic with null pointer (#98648)

Fixes #91144
This commit is contained in:
Daniel Kiss
2024-08-05 11:16:51 +02:00
committed by GitHub
parent dd8a9e2b8c
commit 710590e33d

View File

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