Skip to content

Conversation

airpfei
Copy link
Contributor

@airpfei airpfei commented Oct 7, 2025

No description provided.

@llvmbot
Copy link
Member

llvmbot commented Oct 7, 2025

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Fei Peng (airpfei)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/162385.diff

1 Files Affected:

  • (modified) compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp (+2-2)
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

@airpfei airpfei force-pushed the fix_tsan_x86_build branch from 64c1c2a to 0c78193 Compare October 7, 2025 22:17
@airpfei
Copy link
Contributor Author

airpfei commented Oct 7, 2025

@enh-google @fmayer found another build issue, please review

@vitalybuka vitalybuka requested a review from fmayer October 7, 2025 22:25
@fmayer fmayer merged commit 5d5fe11 into llvm:main Oct 8, 2025
9 checks passed
@airpfei airpfei deleted the fix_tsan_x86_build branch October 8, 2025 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants