Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148724308
D31049.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D31049.diff
View Options
diff --git a/tests/sys/capsicum/Makefile b/tests/sys/capsicum/Makefile
--- a/tests/sys/capsicum/Makefile
+++ b/tests/sys/capsicum/Makefile
@@ -43,6 +43,12 @@
NO_SHARED.$p=
SRCS.$p= mini-me.c
.endfor
+.if ${MK_ASAN} != "no" || ${MK_UBSAN} != "no"
+# mini-me.o is linked into a static binary so we can't use sanitizers.
+# Note: We have to set CFLAGS here since it will be built as part of
+# _PROGS_COMMON_OBJS and therefore NO_SHARED.$p does not disable ASAN/UBSAN.
+CFLAGS.mini-me.c+= -fno-sanitize=address -fno-sanitize=undefined
+.endif
BINDIR= ${TESTSDIR}
diff --git a/usr.sbin/rpcbind/tests/Makefile b/usr.sbin/rpcbind/tests/Makefile
--- a/usr.sbin/rpcbind/tests/Makefile
+++ b/usr.sbin/rpcbind/tests/Makefile
@@ -14,4 +14,12 @@
WARNS?= 3
+.if ${MK_ASAN} != "no"
+# Work around "error: duplicate symbol: getifaddrs" when building with ASAN.
+# The ASAN interceptors also define getifaddrs, but we want to prefer the local
+# stub symbol here, so using a shared sanitizer runtime moves the local
+# definition first in the symbol resolution order.
+LDFLAGS+=-shared-libasan
+.endif
+
.include <bsd.test.mk>
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 20, 8:58 PM (1 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30036656
Default Alt Text
D31049.diff (1 KB)
Attached To
Mode
D31049: Fix MK_TESTS build with MK_ASAN/MK_UBSAN
Attached
Detach File
Event Timeline
Log In to Comment