[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:35:07 PST 2023


https://github.com/devnexen created https://github.com/llvm/llvm-project/pull/76509

freebsd releases up to 13.1 are eol and sched_getaffinity wrapper is available since 13.1.

>From 361e5db552e32cd0e5ab4def6118ef01fe8bfada 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      | 2 +-
 1 file changed, 1 insertion(+), 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..bdf9ced6f0e050 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
@@ -301,7 +301,7 @@
 #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