[compiler-rt] [ASan] Recognize WASI as a platform with 64-bit off_t (PR #144441)
Yuta Saito via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 9 18:00:35 PDT 2026
https://github.com/kateinoigakukun updated https://github.com/llvm/llvm-project/pull/144441
>From a28b24dd16c97bf0a02402dccd04d5a2123e099b Mon Sep 17 00:00:00 2001
From: Yuta Saito <kateinoigakukun at gmail.com>
Date: Wed, 7 May 2025 18:11:45 +0800
Subject: [PATCH] [ASan] Recognize WASI as a platform with 64-bit off_t
https://github.com/WebAssembly/wasi-libc/blob/wasi-sdk-25/libc-bottom-half/headers/public/__typedef_off_t.h
---
compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h b/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
index c694897b6556b..eb0c1b742a606 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
@@ -191,10 +191,11 @@ typedef long pid_t;
typedef int pid_t;
#endif
-#if SANITIZER_FREEBSD || SANITIZER_NETBSD || SANITIZER_APPLE || \
+#if SANITIZER_FREEBSD || SANITIZER_NETBSD || SANITIZER_APPLE || \
(SANITIZER_SOLARIS && (defined(_LP64) || _FILE_OFFSET_BITS == 64)) || \
(SANITIZER_LINUX && !SANITIZER_GLIBC && !SANITIZER_ANDROID) || \
- (SANITIZER_LINUX && (defined(__x86_64__) || defined(__hexagon__)))
+ (SANITIZER_LINUX && (defined(__x86_64__) || defined(__hexagon__))) || \
+ SANITIZER_WASI
typedef u64 OFF_T;
#else
typedef uptr OFF_T;
More information about the llvm-commits
mailing list