Module Name: src Committed By: kamil Date: Sun May 31 16:36:07 UTC 2020
Modified Files: src/tests/include/sys: Makefile Log Message: Mask NULL + 0 LLVM UBSan reports in the ATF test: t_pslist.c Pass -fno-delete-null-pointer-checks for Clang for the MKSANITIZER/MKLIBCSANITIZER build To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/tests/include/sys/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tests/include/sys/Makefile diff -u src/tests/include/sys/Makefile:1.15 src/tests/include/sys/Makefile:1.16 --- src/tests/include/sys/Makefile:1.15 Sun Mar 1 18:08:15 2020 +++ src/tests/include/sys/Makefile Sun May 31 16:36:07 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.15 2020/03/01 18:08:15 christos Exp $ +# $NetBSD: Makefile,v 1.16 2020/05/31 16:36:07 kamil Exp $ NOMAN= # defined @@ -14,6 +14,13 @@ TESTS_C+= t_pslist TESTS_C+= t_tree TESTS_C+= t_types +# NULL + 0 arithmetic raises LLVM UBSan warnings, specially in sys/pslist.h +# in the type-safe macros _PSLIST_VALIDATE_PTRS and _PSLIST_VALIDATE_CONTAINER. +# See also src/sys/rump/Makefile.rump +.if ${MKSANITIZER:Uno} == "yes" || ${MKLIBCSANITIZER:Uno} == "yes" +COPTS.t_pslist.c+= ${${ACTIVE_CC} == "clang":? -fno-delete-null-pointer-checks :} +.endif + CPPFLAGS.t_pslist.c+= -I${NETBSDSRCDIR}/sys LDADD.t_bitops+= -lm