[compiler-rt] [compiler-rt][TSan] Fix compilation error on Android x86 (PR #162385)
Fei Peng via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 7 15:13:38 PDT 2025
https://github.com/airpfei created https://github.com/llvm/llvm-project/pull/162385
None
>From 64c1c2ac803aedd8706fbfd079b76077c9d7a4b7 Mon Sep 17 00:00:00 2001
From: Fei Peng <pengfei.02 at bytedance.com>
Date: Tue, 7 Oct 2025 14:57:23 -0700
Subject: [PATCH] [compiler-rt][TSan] Fix compilation error on Android x86
---
compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp b/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
index 61c9bbb03f7f2..f4168461c61e3 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
@@ -415,7 +415,7 @@ void InitializePlatform() {
// is not compiled with -pie.
#if !SANITIZER_GO
{
-# if SANITIZER_LINUX && (defined(__aarch64__) || defined(__loongarch_lp64))
+# if INIT_LONGJMP_XOR_KEY
// Initialize the xor key used in {sig}{set,long}jump.
InitializeLongjmpXorKey();
# endif
@@ -486,7 +486,7 @@ int ExtractRecvmsgFDs(void *msgp, int *fds, int nfd) {
// Reverse operation of libc stack pointer mangling
static uptr UnmangleLongJmpSp(uptr mangled_sp) {
-# if SANITIZER_ANDROID
+# if INIT_LONGJMP_XOR_KEY
if (longjmp_xor_key == 0) {
// bionic libc initialization process: __libc_init_globals ->
// __libc_init_vdso (calls strcmp) -> __libc_init_setjmp_cookie. strcmp is
More information about the llvm-commits
mailing list