aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2021-11-06 21:34:50 -0800
committerFangrui Song <i@maskray.me>2021-11-06 22:34:50 -0700
commit815b9f53d85e32e13bf318be24e7ece0617ff85d (patch)
treea5c43e48f297763e45b9cbeb2489d96095a77050
parent22e21da47d8adfc9ff5965be2ca682f8e44a6902 (diff)
downloadllvm-815b9f53d85e32e13bf318be24e7ece0617ff85d.zip
llvm-815b9f53d85e32e13bf318be24e7ece0617ff85d.tar.gz
llvm-815b9f53d85e32e13bf318be24e7ece0617ff85d.tar.bz2
[hwasan] Replace _Unwind_Word with uintptr_t
GCC introduced `__attribute__((mode(unwind_word)))` to work around Cell Broadband Engine SPU (which was removed from GCC in 2019-09), which is irrelevant to hwasan. _Unwind_GetGR/_Unwind_GetCFA from llvm-project/libunwind don't use unwind_word. Using _Unwind_Word can lead to build failures if libunwind's unwind.h is preferred over unwind.h in the Clang resource directory (e.g. built with GCC).
-rw-r--r--compiler-rt/lib/hwasan/hwasan_exceptions.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler-rt/lib/hwasan/hwasan_exceptions.cpp b/compiler-rt/lib/hwasan/hwasan_exceptions.cpp
index 169e787..6ed1da3 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,