[compiler-rt] [compiler-rt] intercept sched_getaffinity on freebsd. (PR #76509)
David CARLIER via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 28 07:41:06 PST 2023
https://github.com/devnexen updated https://github.com/llvm/llvm-project/pull/76509
>From 67b8e76ef8b5d5794fc2efaf8c8d988e84b14cfd Mon Sep 17 00:00:00 2001
From: David Carlier <devnexen at gmail.com>
Date: Thu, 28 Dec 2023 15:33:37 +0000
Subject: [PATCH] [compiler-rt] intercept sched_getaffinity on freebsd.
freebsd releases up to 13.1 are eol and sched_getaffinity
wrapper is available since 13.1.
---
.../lib/sanitizer_common/sanitizer_platform_interceptors.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
index 8c7c00de6d1292..c1b416eb8340e3 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
@@ -301,7 +301,8 @@
#define SANITIZER_INTERCEPT_CANONICALIZE_FILE_NAME (SI_GLIBC || SI_SOLARIS)
#define SANITIZER_INTERCEPT_CONFSTR \
(SI_FREEBSD || SI_NETBSD || SI_MAC || SI_LINUX_NOT_ANDROID || SI_SOLARIS)
-#define SANITIZER_INTERCEPT_SCHED_GETAFFINITY SI_LINUX_NOT_ANDROID
+#define SANITIZER_INTERCEPT_SCHED_GETAFFINITY \
+ (SI_LINUX_NOT_ANDROID || SI_FREEBSD)
#define SANITIZER_INTERCEPT_SCHED_GETPARAM SI_LINUX_NOT_ANDROID || SI_SOLARIS
#define SANITIZER_INTERCEPT_STRERROR SI_POSIX
#define SANITIZER_INTERCEPT_STRERROR_R SI_POSIX
More information about the llvm-commits
mailing list