git: d682a91726d7 - main - conf: Do not set -fno-sanitize-memory-param-retval for old compilers
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 11 Jan 2024 19:20:47 UTC
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=d682a91726d72eaf7ba8dddeb4d9ce161ab8b93a
commit d682a91726d72eaf7ba8dddeb4d9ce161ab8b93a
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-01-11 16:42:47 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-01-11 19:20:22 +0000
conf: Do not set -fno-sanitize-memory-param-retval for old compilers
The option was introduced in LLVM 16.
Fixes: b6c653c97463 ("kmsan: Set -fno-sanitize-memory-param-retval for now")
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: Juniper Networks, Inc.
---
sys/conf/kern.pre.mk | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk
index 158175eb6899..6bf647f5c3ea 100644
--- a/sys/conf/kern.pre.mk
+++ b/sys/conf/kern.pre.mk
@@ -125,8 +125,10 @@ KMSAN_ENABLED!= grep KMSAN opt_global.h || true ; echo
# Disable -fno-sanitize-memory-param-retval until interceptors have been
# updated to work properly with it.
SAN_CFLAGS+= -DSAN_NEEDS_INTERCEPTORS -DSAN_INTERCEPTOR_PREFIX=kmsan \
- -fsanitize=kernel-memory \
- -fno-sanitize-memory-param-retval
+ -fsanitize=kernel-memory
+.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 160000
+SAN_CFLAGS+= -fno-sanitize-memory-param-retval
+.endif
.endif
KUBSAN_ENABLED!= grep KUBSAN opt_global.h || true ; echo