[compiler-rt] [sanitizer_common] Disable the fast unwinder on Alpha Linux (PR #220231)
Matt Turner via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 5 21:12:26 PDT 2026
https://github.com/mattst88 updated https://github.com/llvm/llvm-project/pull/220231
>From 28cdf392e06290659750703e157b92abbd23a17c Mon Sep 17 00:00:00 2001
From: Matt Turner <mattst88 at gmail.com>
Date: Tue, 1 Sep 2026 08:11:42 -0400
Subject: [PATCH] [sanitizer_common] Disable the fast unwinder on Alpha Linux
BufferedStackTrace::UnwindFast walks the stack assuming frame[0] is the
caller's frame pointer and frame[1] the return address. Alpha chains
neither, so the walk yields a few garbage frames and then stops:
freed by thread T0 here:
#0 0x020000971274 in free asan_malloc_linux.cpp:51
#1 0x0200007fa48c (<unknown module>)
Opt Alpha out of the fast unwinder the way Linux/MIPS already is. The
_Unwind_Backtrace based unwinder gives complete traces; with it, GCC's
g++.dg/asan/deep-stack-uaf-1.C passes on alpha-unknown-linux-gnu.
Assisted-by: Claude Code
---
compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h b/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h
index 47aed488c71a7..3aea61ba2dc8c 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h
@@ -22,12 +22,12 @@ struct BufferedStackTrace;
static const u32 kStackTraceMax = 255;
-#if SANITIZER_LINUX && defined(__mips__)
-# define SANITIZER_CAN_FAST_UNWIND 0
+#if SANITIZER_LINUX && (defined(__mips__) || defined(__alpha__))
+# define SANITIZER_CAN_FAST_UNWIND 0
#elif SANITIZER_WINDOWS
-# define SANITIZER_CAN_FAST_UNWIND 0
+# define SANITIZER_CAN_FAST_UNWIND 0
#else
-# define SANITIZER_CAN_FAST_UNWIND 1
+# define SANITIZER_CAN_FAST_UNWIND 1
#endif
// Fast unwind is the only option on Mac for now; we will need to
More information about the llvm-commits
mailing list