[compiler-rt] 65bc9c3 - [compiler-rt] Fix __sanitizer_cpuset size on newer FreeBSD
Marco Elver via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 6 03:34:52 PDT 2023
Author: Marco Elver
Date: 2023-07-06T12:34:36+02:00
New Revision: 65bc9c3666092785456570c6343ee9a25ac68613
URL: https://github.com/llvm/llvm-project/commit/65bc9c3666092785456570c6343ee9a25ac68613
DIFF: https://github.com/llvm/llvm-project/commit/65bc9c3666092785456570c6343ee9a25ac68613.diff
LOG: [compiler-rt] Fix __sanitizer_cpuset size on newer FreeBSD
Current FreeBSD has increased size of cpuset. Match it to not break the
build on newer FreeBSD.
Patch by John F. Carr
Fixes: https://github.com/llvm/llvm-project/issues/63485
Added:
Modified:
compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h
Removed:
################################################################################
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h
index b6be60e3966a26..b119f059007d84 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h
@@ -717,7 +717,11 @@ extern unsigned struct_fstab_sz;
extern unsigned struct_StringList_sz;
struct __sanitizer_cpuset {
+#if __FreeBSD_version >= 1400090
+ long __bits[(1024 + (sizeof(long) * 8) - 1) / (sizeof(long) * 8)];
+#else
long __bits[(256 + (sizeof(long) * 8) - 1) / (sizeof(long) * 8)];
+#endif
};
typedef struct __sanitizer_cpuset __sanitizer_cpuset_t;
More information about the llvm-commits
mailing list