From 978029dc7aabc1bda62f4c9c9c4633c2d147a491 Mon Sep 17 00:00:00 2001 From: Jun Yuan Tan Date: Tue, 9 Nov 2021 10:59:58 +0800 Subject: [PATCH 31/34] compiler-rt: Use uintptr_t instead of _Unwind_Word _Unwind_Word is defined in compiler specific unwind.h but not in libunwind provided unwind.h header, it works in most cases because compilers search compiler headers ahead of system headers but for some systems e.g. musl bases systems the compiler provided versions are not preferred over system headers and therefore relying on _Unwind_Word means its expecting this define in all unwind.h headers which is not the case, using uintptr_t means we don't need this from unwind.h See https://reviews.llvm.org/D65699 Rebased to LLVM 14.0.0 by Jun Yuan Tan Signed-off-by: Khem Raj Signed-off-by: Jun Yuan Tan --- compiler-rt/lib/hwasan/hwasan_exceptions.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler-rt/lib/hwasan/hwasan_exceptions.cpp b/compiler-rt/lib/hwasan/hwasan_exceptions.cpp index 169e7876cb58..6ed1da335428 100644 --- a/compiler-rt/lib/hwasan/hwasan_exceptions.cpp +++ b/compiler-rt/lib/hwasan/hwasan_exceptions.cpp @@ -29,8 +29,8 @@ typedef _Unwind_Reason_Code PersonalityFn(int version, _Unwind_Action actions, // is statically linked and the sanitizer runtime and the program are linked // against different unwinders. The _Unwind_Context data structure is opaque so // it may be incompatible between unwinders. -typedef _Unwind_Word GetGRFn(_Unwind_Context* context, int index); -typedef _Unwind_Word GetCFAFn(_Unwind_Context* context); +typedef uintptr_t GetGRFn(_Unwind_Context* context, int index); +typedef uintptr_t GetCFAFn(_Unwind_Context* context); extern "C" SANITIZER_INTERFACE_ATTRIBUTE _Unwind_Reason_Code __hwasan_personality_wrapper(int version, _Unwind_Action actions, -- 2.33.1