CVS commit: src/external/gpl3/gcc/usr.bin/backend
Module Name:src Committed By: fox Date: Fri Jun 12 14:37:51 UTC 2020 Modified Files: src/external/gpl3/gcc/usr.bin/backend: Makefile Log Message: external/gpl3/gcc: Suppress -Werror=maybe-uninitialized Seems like false positive since the ASM_GENERATE_INTERNAL_LABEL macro stores the value into prev_label, so it is alright for prev_label to be uninitialized. Error was reported when build.sh was run with MKSANITIZER=yes flag. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/external/gpl3/gcc/usr.bin/backend/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/usr.bin/backend/Makefile diff -u src/external/gpl3/gcc/usr.bin/backend/Makefile:1.57 src/external/gpl3/gcc/usr.bin/backend/Makefile:1.58 --- src/external/gpl3/gcc/usr.bin/backend/Makefile:1.57 Tue Oct 29 02:49:05 2019 +++ src/external/gpl3/gcc/usr.bin/backend/Makefile Fri Jun 12 14:37:51 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.57 2019/10/29 02:49:05 christos Exp $ +# $NetBSD: Makefile,v 1.58 2020/06/12 14:37:51 fox Exp $ LIBISPRIVATE= yes @@ -595,6 +595,8 @@ COPTS.tree.c= ${${ACTIVE_CC} == "clang" CFLAGS+= -Wno-stack-protector +COPTS.dwarf2out.c+=-Wno-error=maybe-uninitialized + .if ${GCC_MACHINE_ARCH} == "m68000" || ${GCC_MACHINE_ARCH} == "m68k" || \ ${GCC_MACHINE_ARCH} == "coldfire" COPTS.tree-loop-distribution.c+=-O2
CVS commit: src/libexec/httpd
Module Name:src Committed By: fox Date: Sun Jun 7 23:33:02 UTC 2020 Modified Files: src/libexec/httpd: bozohttpd.c Log Message: libexec/httpd: Fix the possible -Werror=stringop-truncation Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag. Reviewed by: kamil@, mrg@ To generate a diff of this commit: cvs rdiff -u -r1.113 -r1.114 src/libexec/httpd/bozohttpd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/httpd/bozohttpd.c diff -u src/libexec/httpd/bozohttpd.c:1.113 src/libexec/httpd/bozohttpd.c:1.114 --- src/libexec/httpd/bozohttpd.c:1.113 Thu Feb 28 09:16:42 2019 +++ src/libexec/httpd/bozohttpd.c Sun Jun 7 23:33:02 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: bozohttpd.c,v 1.113 2019/02/28 09:16:42 mrg Exp $ */ +/* $NetBSD: bozohttpd.c,v 1.114 2020/06/07 23:33:02 fox Exp $ */ /* $eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $ */ @@ -496,7 +496,7 @@ got_proto_09: if (strncasecmp(proto, "HTTP/", 5) != 0) goto bad; - strncpy(majorstr, proto + 5, sizeof majorstr); + strncpy(majorstr, proto + 5, sizeof(majorstr)-1); majorstr[sizeof(majorstr)-1] = 0; minorstr = strchr(majorstr, '.'); if (minorstr == NULL)
CVS commit: src/external/mpl/dhcp/bin/server
Module Name:src Committed By: fox Date: Sun Jun 7 23:29:16 UTC 2020 Modified Files: src/external/mpl/dhcp/bin/server: Makefile Log Message: external/mpl/dhcp: Suppress -Werror=stringop-truncation error This logic correctly uses strncpy(3) to fully initialize a fixed-width field, and also ensures NUL-termination on the next line as other users of the field expect. Add -Werror=stringop-truncation to prevent build failure, when run with MKSANITIZER=yes. Error was reported when build.sh was run with MKSANITIZER=yes flag. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/mpl/dhcp/bin/server/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mpl/dhcp/bin/server/Makefile diff -u src/external/mpl/dhcp/bin/server/Makefile:1.5 src/external/mpl/dhcp/bin/server/Makefile:1.6 --- src/external/mpl/dhcp/bin/server/Makefile:1.5 Sat May 23 00:32:42 2020 +++ src/external/mpl/dhcp/bin/server/Makefile Sun Jun 7 23:29:16 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2020/05/23 00:32:42 rin Exp $ +# $NetBSD: Makefile,v 1.6 2020/06/07 23:29:16 fox Exp $ .include @@ -21,5 +21,6 @@ COPTS.ddns.c +=-Wno-stringop-overflow COPTS.mdb6.c += ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=format-overflow :} COPTS.omapi.c += -Wno-stack-protector +COPTS.confpars.c+= ${GCC_NO_STRINGOP_TRUNCATION} .include
CVS commit: src/external/cddl/osnet/usr.bin/ctfmerge
Module Name:src Committed By: fox Date: Sun Jun 7 23:26:54 UTC 2020 Modified Files: src/external/cddl/osnet/usr.bin/ctfmerge: Makefile Log Message: external/cddl/osnet: Suppress -Werror=stringop-truncation error This logic correctly uses strncpy(3) to fully initialize a fixed-width field, and also ensures NUL-termination on the next line as other users of the field expect. Add -Werror=stringop-truncation to prevent build failure, when run with MKSANITIZER=yes. Error was reported when build.sh was run with MKSANITIZER=yes flag. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/external/cddl/osnet/usr.bin/ctfmerge/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/usr.bin/ctfmerge/Makefile diff -u src/external/cddl/osnet/usr.bin/ctfmerge/Makefile:1.10 src/external/cddl/osnet/usr.bin/ctfmerge/Makefile:1.11 --- src/external/cddl/osnet/usr.bin/ctfmerge/Makefile:1.10 Mon May 28 21:05:11 2018 +++ src/external/cddl/osnet/usr.bin/ctfmerge/Makefile Sun Jun 7 23:26:54 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2018/05/28 21:05:11 chs Exp $ +# $NetBSD: Makefile,v 1.11 2020/06/07 23:26:54 fox Exp $ # $FreeBSD: head/cddl/usr.bin/ctfmerge/Makefile 314654 2017-03-04 11:30:04Z ngie $ @@ -36,4 +36,6 @@ LDADD+=-lpthread DPADD+=${LIBPTHREAD} .endif +COPTS.ctfmerge.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include
CVS commit: src/tests/lib/libarchive
Module Name:src Committed By: fox Date: Sun Jun 7 23:20:52 UTC 2020 Modified Files: src/tests/lib/libarchive: Makefile Log Message: tests/lib/libarchive: Suppress -Werror=stringop-truncation error This logic correctly uses strncpy(3) to fully initialize a fixed-width field, and also ensures NUL-termination on the next line as other users of the field expect. Add -Werror=stringop-truncation to prevent build failure, when run with MKSANITIZER=yes. Error was reported when build.sh was run with MKSANITIZER=yes flag. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libarchive/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/lib/libarchive/Makefile diff -u src/tests/lib/libarchive/Makefile:1.4 src/tests/lib/libarchive/Makefile:1.5 --- src/tests/lib/libarchive/Makefile:1.4 Sun Jan 19 17:36:57 2020 +++ src/tests/lib/libarchive/Makefile Sun Jun 7 23:20:52 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2020/01/19 17:36:57 christos Exp $ +# $NetBSD: Makefile,v 1.5 2020/06/07 23:20:52 fox Exp $ NOMAN= @@ -609,4 +609,5 @@ list.h: ${SRCS.h_libarchive} Makefile ${TOOL_GREP} -v _truncated_filter_ | \ ${TOOL_GREP} -v test_compat_pax_libarchive_2x > ${.TARGET} +COPTS.test_archive_string_conversion.c+= ${GCC_NO_STRINGOP_TRUNCATION}
CVS commit: src/libexec/lfs_cleanerd
Module Name:src Committed By: fox Date: Sun Jun 7 23:15:53 UTC 2020 Modified Files: src/libexec/lfs_cleanerd: Makefile.inc Log Message: libexec/lfs_cleanerd: Suppress -Werror=stringop-truncation error This logic correctly uses strncpy(3) to fully initialize a fixed-width field, and also ensures NUL-termination on the next line as other users of the field expect. Add -Werror=stringop-truncation to prevent build failure, when run with MKSANITIZER=yes. Error was reported when build.sh was run with MKSANITIZER=yes flag. Reviewed by: kamil@, riastradh@ To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/libexec/lfs_cleanerd/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/lfs_cleanerd/Makefile.inc diff -u src/libexec/lfs_cleanerd/Makefile.inc:1.6 src/libexec/lfs_cleanerd/Makefile.inc:1.7 --- src/libexec/lfs_cleanerd/Makefile.inc:1.6 Sat Jun 8 21:15:29 2013 +++ src/libexec/lfs_cleanerd/Makefile.inc Sun Jun 7 23:15:53 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.6 2013/06/08 21:15:29 dholland Exp $ +# $NetBSD: Makefile.inc,v 1.7 2020/06/07 23:15:53 fox Exp $ # @(#)Makefile 8.1 (Berkeley) 6/18/93 WARNS?=3 # XXX: too many sign-compare issues @@ -11,6 +11,8 @@ SRCS+= bufcache.c vnode.c lfs.c kernelop .PATH: ${NETBSDSRCDIR}/sys/ufs/lfs ${NETBSDSRCDIR}/sbin/fsck_lfs \ ${NETBSDSRCDIR}/libexec/lfs_cleanerd +COPTS.lfs_cleanerd.c+= ${GCC_NO_STRINGOP_TRUNCATION} + FSCK_LFS= ${NETBSDSRCDIR}/sbin/fsck_lfs DPADD+= ${LIBUTIL} LDADD+= -lutil
CVS commit: src/external/bsd/atf/lib/libatf-c
Module Name:src Committed By: fox Date: Sun Jun 7 23:09:34 UTC 2020 Modified Files: src/external/bsd/atf/lib/libatf-c: Makefile Log Message: external/bsd/atf: Suppress -Werror=stringop-truncation error This logic correctly uses strncpy(3) to fully initialize a fixed-width field, and also ensures NUL-termination on the next line as other users of the field expect. Add -Werror=stringop-truncation to prevent build failure, when run with MKSANITIZER=yes. Error was reported when build.sh was run with MKSANITIZER=yes flag. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/external/bsd/atf/lib/libatf-c/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/atf/lib/libatf-c/Makefile diff -u src/external/bsd/atf/lib/libatf-c/Makefile:1.22 src/external/bsd/atf/lib/libatf-c/Makefile:1.23 --- src/external/bsd/atf/lib/libatf-c/Makefile:1.22 Wed Jan 29 22:40:44 2020 +++ src/external/bsd/atf/lib/libatf-c/Makefile Sun Jun 7 23:09:34 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.22 2020/01/29 22:40:44 christos Exp $ +# $NetBSD: Makefile,v 1.23 2020/06/07 23:09:34 fox Exp $ NOLINT= # defined @@ -54,6 +54,7 @@ INCSDIR_atf-c.h=/usr/include MAN= atf-c-api.3 COPTS.tc.c+= ${${ACTIVE_CC} == "clang" && ${MACHINE_ARCH} == "powerpc":? -O0 :} +COPTS.fs.c+= ${GCC_NO_STRINGOP_TRUNCATION} .if ${MKSHARE} != "no" FILES+= atf-c.pc
CVS commit: src/external/bsd/dhcpcd/sbin/dhcpcd
Module Name:src Committed By: fox Date: Sat May 2 19:35:03 UTC 2020 Modified Files: src/external/bsd/dhcpcd/sbin/dhcpcd: Makefile Log Message: external/bsd/dhcpcd: Suppress -Werror=sign-conversion error. Add -Wno-error=sign-conversion to prevent build failure, when run with MKLIBCSANITIZER=yes. Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile diff -u src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.51 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.52 --- src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.51 Thu Apr 2 12:56:01 2020 +++ src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile Sat May 2 19:35:03 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.51 2020/04/02 12:56:01 roy Exp $ +# $NetBSD: Makefile,v 1.52 2020/05/02 19:35:03 fox Exp $ # WARNS?= 6 @@ -32,6 +32,13 @@ SRCS+= auth.c CPPFLAGS+= -DINET SRCS+= bpf.c dhcp.c ipv4.c SRCS+= privsep-bpf.c + +.if (${MKLIBCSANITIZER:Uno} == "yes") +.if (${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8) +COPTS.dhcp.c+= -Wno-error=sign-conversion +.endif +.endif + .if !defined(SMALLPROG) CPPFLAGS+= -DARP SRCS+= arp.c
CVS commit: src/lib/libusbhid
Module Name:src Committed By: fox Date: Sat Apr 4 21:26:17 UTC 2020 Modified Files: src/lib/libusbhid: parse.c Log Message: lib/libusbhid: Fix possible left shift changes signedness bit. This bug was reported by UBSan runs. lib/libusbhid/parse.c:246:20 Can result in left shift changes signedness bit as a side effect positive number can go negative, cast it to unsigned for the operation and silence the issue. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/lib/libusbhid/parse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libusbhid/parse.c diff -u src/lib/libusbhid/parse.c:1.10 src/lib/libusbhid/parse.c:1.11 --- src/lib/libusbhid/parse.c:1.10 Sun Dec 10 20:38:14 2017 +++ src/lib/libusbhid/parse.c Sat Apr 4 21:26:16 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.10 2017/12/10 20:38:14 bouyer Exp $ */ +/* $NetBSD: parse.c,v 1.11 2020/04/04 21:26:16 fox Exp $ */ /* * Copyright (c) 1999, 2001 Lennart Augustsson @@ -27,7 +27,7 @@ */ #include -__RCSID("$NetBSD: parse.c,v 1.10 2017/12/10 20:38:14 bouyer Exp $"); +__RCSID("$NetBSD: parse.c,v 1.11 2020/04/04 21:26:16 fox Exp $"); #include #include @@ -243,7 +243,7 @@ hid_get_item_raw(hid_data_t s, hid_item_ dval = *data++; dval |= *data++ << 8; dval |= *data++ << 16; - dval |= *data++ << 24; + dval |= ((uint32_t)*data++) << 24; break; default: return (-1);
CVS commit: src/lib/libusbhid
Module Name:src Committed By: fox Date: Sat Apr 4 21:23:04 UTC 2020 Modified Files: src/lib/libusbhid: usage.c Log Message: lib/libusbhid: Fix possible left shift changes signedness bit. This bug was reported by UBSan runs. lib/libusbhid/usage.c:247:27 lib/libusbhid/usage.c:244:28 lib/libusbhid/usage.c:235:13 Can result in left shift changes signedness bit as a side effect positive number can go negative, cast it to unsigned for the operation and silence the issue. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/lib/libusbhid/usage.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libusbhid/usage.c diff -u src/lib/libusbhid/usage.c:1.10 src/lib/libusbhid/usage.c:1.11 --- src/lib/libusbhid/usage.c:1.10 Sat Jan 2 21:58:10 2016 +++ src/lib/libusbhid/usage.c Sat Apr 4 21:23:04 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: usage.c,v 1.10 2016/01/02 21:58:10 christos Exp $ */ +/* $NetBSD: usage.c,v 1.11 2020/04/04 21:23:04 fox Exp $ */ /* * Copyright (c) 1999 Lennart Augustsson @@ -27,7 +27,7 @@ */ #include -__RCSID("$NetBSD: usage.c,v 1.10 2016/01/02 21:58:10 christos Exp $"); +__RCSID("$NetBSD: usage.c,v 1.11 2020/04/04 21:23:04 fox Exp $"); #include #include @@ -232,7 +232,7 @@ hid_parse_usage_in_page(const char *name if (strncmp(pages[k].name, name, len) == 0) goto found; if (sscanf(name, "%x:%x", , ) == 2) { - return (k << 16) | j; + return (((uint32_t)k) << 16) | j; } return -1; found: @@ -241,9 +241,9 @@ hid_parse_usage_in_page(const char *name if (pages[k].page_contents[j].usage == -1) { if (sscanf(sep, fmtcheck( pages[k].page_contents[j].name, "%u"), ) == 1) { -return (pages[k].usage << 16) | l; +return (((uint32_t)pages[k].usage) << 16) | l; } } else if (strcmp(pages[k].page_contents[j].name, sep) == 0) - return (pages[k].usage << 16) | pages[k].page_contents[j].usage; + return (((uint32_t)pages[k].usage) << 16) | pages[k].page_contents[j].usage; return (-1); }
CVS commit: src/lib/libusbhid
Module Name:src Committed By: fox Date: Sat Apr 4 21:21:35 UTC 2020 Modified Files: src/lib/libusbhid: data.c Log Message: lib/libusbhid: Fix possible left shift changes signedness bit. This bug was reported by UBSan runs. lib/libusbhid/data.c:58:25 lib/libusbhid/data.c:91:7 lib/libusbhid/data.c:92:7 Can result in left shift changes signedness bit as a side effect positive number can go negative, cast it to unsigned for the operation and silence the issue. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libusbhid/data.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libusbhid/data.c diff -u src/lib/libusbhid/data.c:1.8 src/lib/libusbhid/data.c:1.9 --- src/lib/libusbhid/data.c:1.8 Thu Jan 7 19:49:45 2016 +++ src/lib/libusbhid/data.c Sat Apr 4 21:21:35 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: data.c,v 1.8 2016/01/07 19:49:45 jakllsch Exp $ */ +/* $NetBSD: data.c,v 1.9 2020/04/04 21:21:35 fox Exp $ */ /* * Copyright (c) 1999 Lennart Augustsson @@ -27,7 +27,7 @@ */ #include -__RCSID("$NetBSD: data.c,v 1.8 2016/01/07 19:49:45 jakllsch Exp $"); +__RCSID("$NetBSD: data.c,v 1.9 2020/04/04 21:21:35 fox Exp $"); #include #include @@ -55,7 +55,7 @@ hid_get_data(const void *p, const hid_it end = (hpos + hsize + 7) / 8 - offs; data = 0; for (i = 0; i < end; i++) - data |= buf[offs + i] << (i*8); + data |= ((uint32_t)buf[offs + i]) << (i*8); data >>= hpos % 8; if (hsize < 32) { data &= (1 << hsize) - 1; @@ -88,8 +88,8 @@ hid_set_data(void *p, const hid_item_t * } else mask = ~0; - data <<= (hpos % 8); - mask <<= (hpos % 8); + data = ((uint32_t)data) << (hpos % 8); + mask = ((uint32_t)mask) << (hpos % 8); mask = ~mask; offs = hpos / 8;
CVS commit: src/external/cddl/osnet/lib/libdtrace
Module Name:src Committed By: fox Date: Tue Mar 17 01:36:29 UTC 2020 Modified Files: src/external/cddl/osnet/lib/libdtrace: Makefile Log Message: external/cddl/osnet: Do not suppress the warning output for libdtrace. Changed -Wno-maybe-uninitialized to -Wno-error=maybe-uninitialized to allow warnings to be printed out during build. Suggested by: christos@ To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/external/cddl/osnet/lib/libdtrace/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/lib/libdtrace/Makefile diff -u src/external/cddl/osnet/lib/libdtrace/Makefile:1.27 src/external/cddl/osnet/lib/libdtrace/Makefile:1.28 --- src/external/cddl/osnet/lib/libdtrace/Makefile:1.27 Tue Mar 17 00:50:12 2020 +++ src/external/cddl/osnet/lib/libdtrace/Makefile Tue Mar 17 01:36:29 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.27 2020/03/17 00:50:12 fox Exp $ +# $NetBSD: Makefile,v 1.28 2020/03/17 01:36:29 fox Exp $ # $FreeBSD: head/cddl/lib/libdtrace/Makefile 314654 2017-03-04 11:30:04Z ngie $ @@ -96,7 +96,7 @@ COPTS.dt_isadep.c += -Wno-unused-variabl .if (${MKLIBCSANITIZER:Uno} == "yes") .if (${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8) -COPTS.dt_proc.c+= -Wno-maybe-uninitialized +COPTS.dt_proc.c+= -Wno-error=maybe-uninitialized .endif .endif
CVS commit: src/external/bsd/iscsi/dist/src/lib
Module Name:src Committed By: fox Date: Tue Mar 17 00:57:55 UTC 2020 Modified Files: src/external/bsd/iscsi/dist/src/lib: initiator.c Log Message: external/bsd/iscsi: Fix -Werror=maybe-uninitialized error in initiator.c. Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag. Submitted by: mlelstv@ Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/external/bsd/iscsi/dist/src/lib/initiator.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/iscsi/dist/src/lib/initiator.c diff -u src/external/bsd/iscsi/dist/src/lib/initiator.c:1.9 src/external/bsd/iscsi/dist/src/lib/initiator.c:1.10 --- src/external/bsd/iscsi/dist/src/lib/initiator.c:1.9 Fri Nov 1 07:53:34 2013 +++ src/external/bsd/iscsi/dist/src/lib/initiator.c Tue Mar 17 00:57:54 2020 @@ -794,6 +794,7 @@ discovery_phase(int target, strv_t *svp) } } else { /* the user has asked for a specific target - find it */ + ptr = NULL; for (i = 0 ; i < svp->c ; i += 2) { if (strcmp(g_target[target].iqnwanted, svp->v[i]) == 0) { @@ -803,7 +804,7 @@ discovery_phase(int target, strv_t *svp) break; } } - if (i >= svp->c) { + if (ptr == NULL) { iscsi_err(__FILE__, __LINE__, "SendTargets failed - target `%s' not found\n", g_target[target].iqnwanted);
CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs
Module Name:src Committed By: fox Date: Tue Mar 17 00:54:03 UTC 2020 Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_acl.c Log Message: external/cddl/osnet: Fix -Werror=maybe-uninitialized error in zfs_acl.c. Detected by build.sh with MKLIBCSANITIZER=yes and fixed upstream, pick only the fix from the commit. Upstream commits https://github.com/zfsonfreebsd/ZoF/commit/100a91aa3e9773f2a2a373c5cb066b52c780716c https://github.com/openzfs/zfs/commit/100a91aa3e9773f2a2a373c5cb066b52c780716c Cherry-pick: >From 100a91aa3e9773f2a2a373c5cb066b52c780716c Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Fri, 17 Jun 2016 17:36:01 -0700 Subject: [PATCH] Fix NFS credential Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Closes #4772 Closes #4758 Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_acl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_acl.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_acl.c:1.5 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_acl.c:1.6 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_acl.c:1.5 Fri Sep 7 02:25:40 2018 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_acl.c Tue Mar 17 00:54:03 2020 @@ -1598,7 +1598,7 @@ zfs_acl_ids_create(znode_t *dzp, int fla int error; zfsvfs_t *zfsvfs = dzp->z_zfsvfs; zfs_acl_t *paclp; - gid_t gid; + gid_t gid = vap->va_gid; boolean_t trim = B_FALSE; boolean_t inherited = B_FALSE;
CVS commit: src/external/cddl/osnet/lib/libdtrace
Module Name:src Committed By: fox Date: Tue Mar 17 00:50:12 UTC 2020 Modified Files: src/external/cddl/osnet/lib/libdtrace: Makefile Log Message: external/cddl/osnet: Supress -Werror=maybe-uninitialized error in libdtrace. It looks like this is a false positive, since the section of code triggering the error external/cddl/osnet/dist/lib/libdtrace/common/dt_proc.c:400:42: is only accessed after "err" is initialized. Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/external/cddl/osnet/lib/libdtrace/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/lib/libdtrace/Makefile diff -u src/external/cddl/osnet/lib/libdtrace/Makefile:1.26 src/external/cddl/osnet/lib/libdtrace/Makefile:1.27 --- src/external/cddl/osnet/lib/libdtrace/Makefile:1.26 Tue Dec 3 22:10:56 2019 +++ src/external/cddl/osnet/lib/libdtrace/Makefile Tue Mar 17 00:50:12 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.26 2019/12/03 22:10:56 jmcneill Exp $ +# $NetBSD: Makefile,v 1.27 2020/03/17 00:50:12 fox Exp $ # $FreeBSD: head/cddl/lib/libdtrace/Makefile 314654 2017-03-04 11:30:04Z ngie $ @@ -94,6 +94,12 @@ COPTS.dt_options.c += -Wno-parentheses COPTS.dt_pid.c += ${${ACTIVE_CC} == "gcc" :? -Wno-unused-but-set-variable :} COPTS.dt_isadep.c += -Wno-unused-variable +.if (${MKLIBCSANITIZER:Uno} == "yes") +.if (${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8) +COPTS.dt_proc.c+= -Wno-maybe-uninitialized +.endif +.endif + .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" CPPFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/intel CPPFLAGS+= -I${.CURDIR}/../../dev/dtrace/x86
CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs
Module Name:src Committed By: fox Date: Mon Mar 9 15:40:50 UTC 2020 Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs: metaslab.c Log Message: external/cddl/osnet: Fix possible null pointer access. Detected by UBSan and fixed upstream, pick only the fix from the commit. Cherry-pick: >From 928e8ad47d3478a3d5d01f0dd6ae74a9371af65e Mon Sep 17 00:00:00 2001 From: Serapheim Dimitropoulos Date: Wed, 20 Feb 2019 09:59:57 -0800 Subject: [PATCH] Introduce auxiliary metaslab histograms Reviewed by: Paul Dagnelie Reviewed-by: Brian Behlendorf Reviewed by: Matt Ahrens Signed-off-by: Serapheim Dimitropoulos Closes #8358 Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.1.1.3 -r1.2 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/metaslab.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/metaslab.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/metaslab.c:1.1.1.3 src/external/cddl/osnet/dist/uts/common/fs/zfs/metaslab.c:1.2 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/metaslab.c:1.1.1.3 Mon May 28 20:52:58 2018 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/metaslab.c Mon Mar 9 15:40:50 2020 @@ -3370,7 +3370,7 @@ metaslab_alloc(spa_t *spa, metaslab_clas zio_alloc_list_t *zal, zio_t *zio) { dva_t *dva = bp->blk_dva; - dva_t *hintdva = hintbp->blk_dva; + dva_t *hintdva = (hintbp != NULL) ? hintbp->blk_dva : NULL; int error = 0; ASSERT(bp->blk_birth == 0);
CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs
Module Name:src Committed By: fox Date: Mon Mar 9 15:37:46 UTC 2020 Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs: dmu_tx.c spa.c Log Message: external/cddl/osnet: Fix possible signed integer overflow Detected by UBSan and fixed upstream Cherry-pick: >From 05852b3467b44cdf88541ec67624cd1f5f2ded1d Mon Sep 17 00:00:00 2001 From: luozhengzheng Date: Fri, 14 Oct 2016 05:25:05 +0800 Subject: [PATCH] Fix coverity defects: CID 147571, 147574 CID 147571: Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN) CID 147574: Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN) Reviewed-by: Brian Behlendorf Signed-off-by: luozhengzheng Closes #5268 Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/dmu_tx.c cvs rdiff -u -r1.10 -r1.11 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/spa.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/dmu_tx.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/dmu_tx.c:1.4 src/external/cddl/osnet/dist/uts/common/fs/zfs/dmu_tx.c:1.5 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/dmu_tx.c:1.4 Fri Jun 21 10:59:50 2019 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/dmu_tx.c Mon Mar 9 15:37:46 2020 @@ -412,7 +412,7 @@ dmu_tx_count_dnode(dmu_tx_hold_t *txh) dnode_t *dn = txh->txh_dnode; dnode_t *mdn = DMU_META_DNODE(txh->txh_tx->tx_objset); uint64_t space = mdn->dn_datablksz + - ((mdn->dn_nlevels-1) << mdn->dn_indblkshift); + ((uint64_t)(mdn->dn_nlevels-1) << mdn->dn_indblkshift); if (dn && dn->dn_dbuf->db_blkptr && dsl_dataset_block_freeable(dn->dn_objset->os_dsl_dataset, Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/spa.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/spa.c:1.10 src/external/cddl/osnet/dist/uts/common/fs/zfs/spa.c:1.11 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/spa.c:1.10 Tue Jul 23 07:46:22 2019 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/spa.c Mon Mar 9 15:37:46 2020 @@ -6293,7 +6293,7 @@ spa_async_tasks_pending(spa_t *spa) } else { config_task_suspended = (gethrtime() - spa->spa_ccw_fail_time) < - (zfs_ccw_retry_interval * NANOSEC); + ((hrtime_t)zfs_ccw_retry_interval * NANOSEC); } return (non_config_tasks || (config_task && !config_task_suspended));
CVS commit: src/common/lib/libc/stdlib
Module Name:src Committed By: fox Date: Sat Feb 22 14:47:29 UTC 2020 Modified Files: src/common/lib/libc/stdlib: random.c Log Message: common/lib/libc/stdlib: Fix possible signed integer overflow. common/lib/libc/stdlib/random.c:482:6 can result in signed integer overflow. This bug was reported by UBSan runs. The change has been tested using the following program to generate random numbers in both the old and the new library and can be used to verify the correctness of the library after the change. #include #include #define COUNT 1000 * 1000 int main(void) { int i; FILE *fp = fopen("numbers.txt", "w"); srandom(0xdeadbeef); for(i = 0; i < COUNT; i++) { fprintf(fp, "%ld\n", random()); } fclose(fp); return 0; } Reviewed by: riastradh@ , kamil@ To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/stdlib/random.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/stdlib/random.c diff -u src/common/lib/libc/stdlib/random.c:1.5 src/common/lib/libc/stdlib/random.c:1.6 --- src/common/lib/libc/stdlib/random.c:1.5 Mon Feb 8 05:27:24 2016 +++ src/common/lib/libc/stdlib/random.c Sat Feb 22 14:47:29 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: random.c,v 1.5 2016/02/08 05:27:24 dholland Exp $ */ +/* $NetBSD: random.c,v 1.6 2020/02/22 14:47:29 fox Exp $ */ /* * Copyright (c) 1983, 1993 @@ -35,7 +35,7 @@ #if 0 static char sccsid[] = "@(#)random.c 8.2 (Berkeley) 5/19/95"; #else -__RCSID("$NetBSD: random.c,v 1.5 2016/02/08 05:27:24 dholland Exp $"); +__RCSID("$NetBSD: random.c,v 1.6 2020/02/22 14:47:29 fox Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -189,7 +189,7 @@ static const int seps[MAX_TYPES] = { SEP */ /* LINTED */ -static int randtbl[DEG_3 + 1] = { +static uint32_t randtbl[DEG_3 + 1] = { TYPE_3, #ifdef USE_BETTER_RANDOM 0x991539b1, 0x16a5bce3, 0x6774a4cd, @@ -232,8 +232,8 @@ static int randtbl[DEG_3 + 1] = { * in the initialization of randtbl) because the state table pointer is set * to point to randtbl[1] (as explained below). */ -static int *fptr = [SEP_3 + 1]; -static int *rptr = [1]; +static uint32_t *fptr = [SEP_3 + 1]; +static uint32_t *rptr = [1]; /* * The following things are the pointer to the state information table, the @@ -245,11 +245,11 @@ static int *rptr = [1]; * this is more efficient than indexing every time to find the address of * the last element to see if the front and rear pointers have wrapped. */ -static int *state = [1]; +static uint32_t *state = [1]; static int rand_type = TYPE_3; static int rand_deg = DEG_3; static int rand_sep = SEP_3; -static int *end_ptr = [DEG_3 + 1]; +static uint32_t *end_ptr = [DEG_3 + 1]; /* * srandom: @@ -340,17 +340,17 @@ initstate( size_t n) /* # bytes of state info */ { void *ostate = (void *)([-1]); - int *int_arg_state; + uint32_t *int_arg_state; _DIAGASSERT(arg_state != NULL); - int_arg_state = (int *)(void *)arg_state; + int_arg_state = (uint32_t *)(void *)arg_state; mutex_lock(_mutex); if (rand_type == TYPE_0) state[-1] = rand_type; else - state[-1] = MAX_TYPES * (int)(rptr - state) + rand_type; + state[-1] = MAX_TYPES * (uint32_t)(rptr - state) + rand_type; if (n < BREAK_0) { mutex_unlock(_mutex); return (NULL); @@ -375,13 +375,13 @@ initstate( rand_deg = DEG_4; rand_sep = SEP_4; } - state = (int *) (int_arg_state + 1); /* first location */ + state = (uint32_t *) (int_arg_state + 1); /* first location */ end_ptr = [rand_deg]; /* must set end_ptr before srandom */ srandom_unlocked(seed); if (rand_type == TYPE_0) int_arg_state[0] = rand_type; else - int_arg_state[0] = MAX_TYPES * (int)(rptr - state) + rand_type; + int_arg_state[0] = MAX_TYPES * (uint32_t)(rptr - state) + rand_type; mutex_unlock(_mutex); return((char *)ostate); } @@ -408,22 +408,22 @@ initstate( char * setstate(char *arg_state) /* pointer to state array */ { - int *new_state; - int type; - int rear; + uint32_t *new_state; + uint32_t type; + uint32_t rear; void *ostate = (void *)([-1]); _DIAGASSERT(arg_state != NULL); - new_state = (int *)(void *)arg_state; - type = (int)(new_state[0] % MAX_TYPES); - rear = (int)(new_state[0] / MAX_TYPES); + new_state = (uint32_t *)(void *)arg_state; + type = (uint32_t)(new_state[0] % MAX_TYPES); + rear = (uint32_t)(new_state[0] / MAX_TYPES); mutex_lock(_mutex); if (rand_type == TYPE_0) state[-1] = rand_type; else - state[-1] = MAX_TYPES * (int)(rptr - state) + rand_type; + state[-1] = MAX_TYPES * (uint32_t)(rptr - state) + rand_type; switch(type) { case TYPE_0: case TYPE_1: @@ -438,7 +438,7 @@ setstate(char *arg_state) /* pointer to mutex_unlock(_mutex); return (NULL); } - state = (int *) (new_state + 1); + state = (uint32_t *) (new_state + 1); if (rand_type !=
CVS commit: src/external/mpl/dhcp/bin/server
Module Name:src Committed By: fox Date: Wed Feb 12 00:41:50 UTC 2020 Modified Files: src/external/mpl/dhcp/bin/server: Makefile Log Message: external/mpl/dhcp: Fix build failure under LLVM. -Wno-error= flag now only applies to gcc 8 and not to LLVM based builds. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/mpl/dhcp/bin/server/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mpl/dhcp/bin/server/Makefile diff -u src/external/mpl/dhcp/bin/server/Makefile:1.3 src/external/mpl/dhcp/bin/server/Makefile:1.4 --- src/external/mpl/dhcp/bin/server/Makefile:1.3 Sun Feb 9 07:59:44 2020 +++ src/external/mpl/dhcp/bin/server/Makefile Wed Feb 12 00:41:50 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2020/02/09 07:59:44 fox Exp $ +# $NetBSD: Makefile,v 1.4 2020/02/12 00:41:50 fox Exp $ .include @@ -19,7 +19,7 @@ FILES= dhcpd.conf COPTS.ddns.c +=-Wno-stringop-overflow .endif -COPTS.mdb6.c += -Wno-error=format-overflow +COPTS.mdb6.c += ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=format-overflow :} COPTS.omapi.c += -Wno-stack-protector .include
CVS commit: src/external/gpl3/gcc/usr.bin
Module Name:src Committed By: fox Date: Wed Feb 12 00:36:38 UTC 2020 Modified Files: src/external/gpl3/gcc/usr.bin/cc1: Makefile src/external/gpl3/gcc/usr.bin/cc1obj: Makefile Log Message: external/gpl3/gcc: Fix build failure under LLVM. -Wno-error= flag now only applies to gcc 8 and not to LLVM based builds. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/external/gpl3/gcc/usr.bin/cc1/Makefile cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gcc/usr.bin/cc1obj/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/usr.bin/cc1/Makefile diff -u src/external/gpl3/gcc/usr.bin/cc1/Makefile:1.15 src/external/gpl3/gcc/usr.bin/cc1/Makefile:1.16 --- src/external/gpl3/gcc/usr.bin/cc1/Makefile:1.15 Sun Feb 9 08:04:40 2020 +++ src/external/gpl3/gcc/usr.bin/cc1/Makefile Wed Feb 12 00:36:37 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.15 2020/02/09 08:04:40 fox Exp $ +# $NetBSD: Makefile,v 1.16 2020/02/12 00:36:37 fox Exp $ PROG= cc1 SRCS= ${G_C_OBJS:S,c-family/,,:S,c/,,:Nlibcpp.a:.o=.c} main.c ${PROG}-checksum.c @@ -32,7 +32,7 @@ COPTS.c-ada-spec.c= -Wno-stack-protector COPTS.c-attribs.c= -Wno-stack-protector COPTS.c-aux-info.c= -Wno-stack-protector COPTS.c-common.c= -Wno-stack-protector -COPTS.c-cppbuiltin.c= -Wno-stack-protector -Wno-error=format-overflow +COPTS.c-cppbuiltin.c= -Wno-stack-protector COPTS.c-decl.c= -Wno-stack-protector COPTS.c-format.c= -Wno-stack-protector COPTS.c-format.h= -Wno-stack-protector @@ -40,7 +40,10 @@ COPTS.c-lex.c= -Wno-stack-protector COPTS.c-opts.c= -Wno-stack-protector COPTS.c-ppoutput.c= -Wno-stack-protector COPTS.c-pragma.c= -Wno-stack-protector -COPTS.c-typeck.c= -Wno-stack-protector -Wno-error=format-overflow +COPTS.c-typeck.c= -Wno-stack-protector + +COPTS.c-cppbuiltin.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=format-overflow :} +COPTS.c-typeck.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=format-overflow :} CPPFLAGS.default-c.c+= -I${BACKENDOBJ} Index: src/external/gpl3/gcc/usr.bin/cc1obj/Makefile diff -u src/external/gpl3/gcc/usr.bin/cc1obj/Makefile:1.13 src/external/gpl3/gcc/usr.bin/cc1obj/Makefile:1.14 --- src/external/gpl3/gcc/usr.bin/cc1obj/Makefile:1.13 Sun Feb 9 08:04:40 2020 +++ src/external/gpl3/gcc/usr.bin/cc1obj/Makefile Wed Feb 12 00:36:37 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.13 2020/02/09 08:04:40 fox Exp $ +# $NetBSD: Makefile,v 1.14 2020/02/12 00:36:37 fox Exp $ MYOBJS= ${G_OBJC_OBJS} ${G_C_AND_OBJC_OBJS} PROG= cc1obj @@ -35,17 +35,20 @@ COPTS.c-ada-spec.c+= -Wno-stack-protec COPTS.c-attribs.c+= -Wno-stack-protector COPTS.c-aux-info.c+= -Wno-stack-protector COPTS.c-common.c+= -Wno-stack-protector -COPTS.c-cppbuiltin.c+= -Wno-stack-protector -Wno-error=format-overflow +COPTS.c-cppbuiltin.c+= -Wno-stack-protector COPTS.c-decl.c+= -Wno-stack-protector COPTS.c-format.c+= -Wno-stack-protector COPTS.c-lex.c+=-Wno-stack-protector COPTS.c-ppoutput.c+= -Wno-stack-protector COPTS.c-pragma.c+= -Wno-stack-protector -COPTS.c-typeck.c+= -Wno-stack-protector -Wno-error=format-overflow +COPTS.c-typeck.c+= -Wno-stack-protector COPTS.objc-act.c+= -Wno-stack-protector COPTS.objc-gnu-runtime-abi-01.c+= -Wno-stack-protector COPTS.objc-next-runtime-abi-01.c+= -Wno-stack-protector +COPTS.c-cppbuiltin.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=format-overflow :} +COPTS.c-typeck.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=format-overflow :} + .if ${MACHINE_ARCH} == "vax" COPTS.c-decl.c+=-O0 COPTS.c-typeck.c+=-O0
CVS commit: src/external/bsd/ipf/bin
Module Name:src Committed By: fox Date: Wed Feb 12 00:30:48 UTC 2020 Modified Files: src/external/bsd/ipf/bin/ipmon: Makefile src/external/bsd/ipf/bin/ipsend: Makefile Log Message: external/bsd/ipf: Fix build failure under LLVM. -Wno-error= flag now only applies to gcc 8 and not to LLVM based builds. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/ipf/bin/ipmon/Makefile cvs rdiff -u -r1.4 -r1.5 src/external/bsd/ipf/bin/ipsend/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/ipf/bin/ipmon/Makefile diff -u src/external/bsd/ipf/bin/ipmon/Makefile:1.2 src/external/bsd/ipf/bin/ipmon/Makefile:1.3 --- src/external/bsd/ipf/bin/ipmon/Makefile:1.2 Sun Feb 9 07:47:50 2020 +++ src/external/bsd/ipf/bin/ipmon/Makefile Wed Feb 12 00:30:48 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2020/02/09 07:47:50 fox Exp $ +# $NetBSD: Makefile,v 1.3 2020/02/12 00:30:48 fox Exp $ PROG= ipmon SRCS= ipmon.c ipmon_y.c ipmon_l.c @@ -11,7 +11,7 @@ DPSRCS+= ipmon_l.h ipmon_y.h CLEANFILES+= ipmon_y.c ipmon_y.h CLEANFILES+= ipmon_l.c ipmon_l.h -COPTS.ipmon.c+= -Wno-error=format-overflow +COPTS.ipmon.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=format-overflow :} ipmon_y.c: ipmon_y.y ${_MKTARGET_CREATE} Index: src/external/bsd/ipf/bin/ipsend/Makefile diff -u src/external/bsd/ipf/bin/ipsend/Makefile:1.4 src/external/bsd/ipf/bin/ipsend/Makefile:1.5 --- src/external/bsd/ipf/bin/ipsend/Makefile:1.4 Sun Feb 9 07:51:20 2020 +++ src/external/bsd/ipf/bin/ipsend/Makefile Wed Feb 12 00:30:48 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2020/02/09 07:51:20 fox Exp $ +# $NetBSD: Makefile,v 1.5 2020/02/12 00:30:48 fox Exp $ .include .include "../Makefile.inc" @@ -25,7 +25,7 @@ DPSRCS+= iplang_y.h .PATH: ${UDIST}/ipsend \ ${UDIST}/iplang -COPTS.ipsopt.c+= -Wno-error=maybe-uninitialized +COPTS.ipsopt.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=maybe-uninitialized :} iplang_y.c: iplang_y.y ${_MKTARGET_CREATE}
CVS commit: src/usr.sbin/ypserv/makedbm
Module Name:src Committed By: fox Date: Sun Feb 9 15:52:48 UTC 2020 Modified Files: src/usr.sbin/ypserv/makedbm: Makefile Log Message: usr.sbin/ypserv: Suppress -Werror=format-truncation= error. Add GCC_NO_FORMAT_TRUNCATION makedbm.c to prevent build failure. Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/ypserv/makedbm/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/ypserv/makedbm/Makefile diff -u src/usr.sbin/ypserv/makedbm/Makefile:1.5 src/usr.sbin/ypserv/makedbm/Makefile:1.6 --- src/usr.sbin/ypserv/makedbm/Makefile:1.5 Thu Oct 2 14:16:19 1997 +++ src/usr.sbin/ypserv/makedbm/Makefile Sun Feb 9 15:52:48 2020 @@ -1,6 +1,8 @@ -# $NetBSD: Makefile,v 1.5 1997/10/02 14:16:19 lukem Exp $ +# $NetBSD: Makefile,v 1.6 2020/02/09 15:52:48 fox Exp $ PROG= makedbm MAN= makedbm.8 +CWARNFLAGS+= ${GCC_NO_FORMAT_TRUNCATION} + .include
CVS commit: src/usr.sbin/timed/timed
Module Name:src Committed By: fox Date: Sun Feb 9 15:13:28 UTC 2020 Modified Files: src/usr.sbin/timed/timed: Makefile Log Message: usr.sbin/timed: Suppress -Werror=stringop-truncation error. Add GCC_NO_STRINGOP_TRUNCATION master.c to prevent build failure. Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/timed/timed/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/timed/timed/Makefile diff -u src/usr.sbin/timed/timed/Makefile:1.13 src/usr.sbin/timed/timed/Makefile:1.14 --- src/usr.sbin/timed/timed/Makefile:1.13 Mon Nov 11 22:45:32 2019 +++ src/usr.sbin/timed/timed/Makefile Sun Feb 9 15:13:28 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.13 2019/11/11 22:45:32 joerg Exp $ +# $NetBSD: Makefile,v 1.14 2020/02/09 15:13:28 fox Exp $ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # # optional flags are: MEASURE TESTING DEBUG @@ -13,4 +13,6 @@ MAN= timed.8 CWARNFLAGS.clang+= -Wno-error=implicit-int-float-conversion +COPTS.master.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include
CVS commit: src/usr.sbin/srtconfig
Module Name:src Committed By: fox Date: Sun Feb 9 15:10:31 UTC 2020 Modified Files: src/usr.sbin/srtconfig: Makefile Log Message: usr.sbin/srtconfig: Suppress -Werror=stringop-truncation error. Add GCC_NO_STRINGOP_TRUNCATION to srtconfig.c to prevent build failure. Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/srtconfig/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/srtconfig/Makefile diff -u src/usr.sbin/srtconfig/Makefile:1.2 src/usr.sbin/srtconfig/Makefile:1.3 --- src/usr.sbin/srtconfig/Makefile:1.2 Fri Dec 29 10:39:59 2006 +++ src/usr.sbin/srtconfig/Makefile Sun Feb 9 15:10:31 2020 @@ -1,7 +1,9 @@ -# $NetBSD: Makefile,v 1.2 2006/12/29 10:39:59 wiz Exp $ +# $NetBSD: Makefile,v 1.3 2020/02/09 15:10:31 fox Exp $ # This file is in the public domain. PROG= srtconfig SRCS= srtconfig.c +COPTS.srtconfig.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include
CVS commit: src/usr.bin/xlint/xlint
Module Name:src Committed By: fox Date: Sun Feb 9 08:10:26 UTC 2020 Modified Files: src/usr.bin/xlint/xlint: xlint.c Log Message: usr.bin/xlint: Fix -Werror=format-overflow= error. Replace sprintf(3) with snprintf(3). Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/usr.bin/xlint/xlint/xlint.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/xlint/xlint/xlint.c diff -u src/usr.bin/xlint/xlint/xlint.c:1.47 src/usr.bin/xlint/xlint/xlint.c:1.48 --- src/usr.bin/xlint/xlint/xlint.c:1.47 Sat Apr 13 15:08:49 2019 +++ src/usr.bin/xlint/xlint/xlint.c Sun Feb 9 08:10:25 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: xlint.c,v 1.47 2019/04/13 15:08:49 christos Exp $ */ +/* $NetBSD: xlint.c,v 1.48 2020/02/09 08:10:25 fox Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -38,7 +38,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: xlint.c,v 1.47 2019/04/13 15:08:49 christos Exp $"); +__RCSID("$NetBSD: xlint.c,v 1.48 2020/02/09 08:10:25 fox Exp $"); #endif #include @@ -613,7 +613,7 @@ fname(const char *name) const char *bn, *suff; char **args, *ofn, *pathname; const char *CC; - size_t len; + size_t buff_size, len; int is_stdin; int fd; @@ -648,10 +648,10 @@ fname(const char *name) warnx("-i not supported without -o for standard input"); return; } - ofn = xmalloc(strlen(bn) + (bn == suff ? 4 : 2)); + buff_size = strlen(bn) + (bn == suff ? 4 : 2); + ofn = xmalloc(buff_size); len = bn == suff ? strlen(bn) : (size_t)((suff - 1) - bn); - (void)sprintf(ofn, "%.*s", (int)len, bn); - (void)strcat(ofn, ".ln"); + (void)snprintf(ofn, buff_size, "%.*s.ln", (int)len, bn); } else { ofn = xmalloc(strlen(tmpdir) + sizeof ("lint1.XX")); (void)sprintf(ofn, "%slint1.XX", tmpdir);
CVS commit: src/external/gpl3/gcc/usr.bin
Module Name:src Committed By: fox Date: Sun Feb 9 08:04:40 UTC 2020 Modified Files: src/external/gpl3/gcc/usr.bin/cc1: Makefile src/external/gpl3/gcc/usr.bin/cc1obj: Makefile Log Message: external/gpl3/gcc: Suppress -Werror=format-overflow error. Add -Wno-error=format-overflow for c-cppbuiltin.c and c-typeck.c to prevent build failure. Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gcc/usr.bin/cc1/Makefile cvs rdiff -u -r1.12 -r1.13 src/external/gpl3/gcc/usr.bin/cc1obj/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/usr.bin/cc1/Makefile diff -u src/external/gpl3/gcc/usr.bin/cc1/Makefile:1.14 src/external/gpl3/gcc/usr.bin/cc1/Makefile:1.15 --- src/external/gpl3/gcc/usr.bin/cc1/Makefile:1.14 Wed Feb 6 16:57:30 2019 +++ src/external/gpl3/gcc/usr.bin/cc1/Makefile Sun Feb 9 08:04:40 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.14 2019/02/06 16:57:30 christos Exp $ +# $NetBSD: Makefile,v 1.15 2020/02/09 08:04:40 fox Exp $ PROG= cc1 SRCS= ${G_C_OBJS:S,c-family/,,:S,c/,,:Nlibcpp.a:.o=.c} main.c ${PROG}-checksum.c @@ -32,7 +32,7 @@ COPTS.c-ada-spec.c= -Wno-stack-protector COPTS.c-attribs.c= -Wno-stack-protector COPTS.c-aux-info.c= -Wno-stack-protector COPTS.c-common.c= -Wno-stack-protector -COPTS.c-cppbuiltin.c= -Wno-stack-protector +COPTS.c-cppbuiltin.c= -Wno-stack-protector -Wno-error=format-overflow COPTS.c-decl.c= -Wno-stack-protector COPTS.c-format.c= -Wno-stack-protector COPTS.c-format.h= -Wno-stack-protector @@ -40,7 +40,7 @@ COPTS.c-lex.c= -Wno-stack-protector COPTS.c-opts.c= -Wno-stack-protector COPTS.c-ppoutput.c= -Wno-stack-protector COPTS.c-pragma.c= -Wno-stack-protector -COPTS.c-typeck.c= -Wno-stack-protector +COPTS.c-typeck.c= -Wno-stack-protector -Wno-error=format-overflow CPPFLAGS.default-c.c+= -I${BACKENDOBJ} Index: src/external/gpl3/gcc/usr.bin/cc1obj/Makefile diff -u src/external/gpl3/gcc/usr.bin/cc1obj/Makefile:1.12 src/external/gpl3/gcc/usr.bin/cc1obj/Makefile:1.13 --- src/external/gpl3/gcc/usr.bin/cc1obj/Makefile:1.12 Wed Feb 6 16:57:30 2019 +++ src/external/gpl3/gcc/usr.bin/cc1obj/Makefile Sun Feb 9 08:04:40 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.12 2019/02/06 16:57:30 christos Exp $ +# $NetBSD: Makefile,v 1.13 2020/02/09 08:04:40 fox Exp $ MYOBJS= ${G_OBJC_OBJS} ${G_C_AND_OBJC_OBJS} PROG= cc1obj @@ -35,13 +35,13 @@ COPTS.c-ada-spec.c+= -Wno-stack-protec COPTS.c-attribs.c+= -Wno-stack-protector COPTS.c-aux-info.c+= -Wno-stack-protector COPTS.c-common.c+= -Wno-stack-protector -COPTS.c-cppbuiltin.c+= -Wno-stack-protector +COPTS.c-cppbuiltin.c+= -Wno-stack-protector -Wno-error=format-overflow COPTS.c-decl.c+= -Wno-stack-protector COPTS.c-format.c+= -Wno-stack-protector COPTS.c-lex.c+=-Wno-stack-protector COPTS.c-ppoutput.c+= -Wno-stack-protector COPTS.c-pragma.c+= -Wno-stack-protector -COPTS.c-typeck.c+= -Wno-stack-protector +COPTS.c-typeck.c+= -Wno-stack-protector -Wno-error=format-overflow COPTS.objc-act.c+= -Wno-stack-protector COPTS.objc-gnu-runtime-abi-01.c+= -Wno-stack-protector COPTS.objc-next-runtime-abi-01.c+= -Wno-stack-protector
CVS commit: src/external/mpl/dhcp/bin/server
Module Name:src Committed By: fox Date: Sun Feb 9 07:59:44 UTC 2020 Modified Files: src/external/mpl/dhcp/bin/server: Makefile Log Message: external/mpl/dhcp: Suppress -Werror=format-overflow error. Add -Wno-error=format-overflow mdb6.c to prevent build failure. Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/mpl/dhcp/bin/server/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mpl/dhcp/bin/server/Makefile diff -u src/external/mpl/dhcp/bin/server/Makefile:1.2 src/external/mpl/dhcp/bin/server/Makefile:1.3 --- src/external/mpl/dhcp/bin/server/Makefile:1.2 Wed Oct 30 00:25:00 2019 +++ src/external/mpl/dhcp/bin/server/Makefile Sun Feb 9 07:59:44 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2019/10/30 00:25:00 christos Exp $ +# $NetBSD: Makefile,v 1.3 2020/02/09 07:59:44 fox Exp $ .include @@ -19,6 +19,7 @@ FILES= dhcpd.conf COPTS.ddns.c +=-Wno-stringop-overflow .endif +COPTS.mdb6.c += -Wno-error=format-overflow COPTS.omapi.c += -Wno-stack-protector .include
CVS commit: src/external/cddl/osnet/usr.bin/ctfconvert
Module Name:src Committed By: fox Date: Sun Feb 9 07:55:13 UTC 2020 Modified Files: src/external/cddl/osnet/usr.bin/ctfconvert: Makefile Log Message: external/cddl/osnet: Suppress -Werror=stringop-truncation error. Add GCC_NO_STRINGOP_TRUNCATION dwarf.c to prevent build failure. Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/external/cddl/osnet/usr.bin/ctfconvert/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/usr.bin/ctfconvert/Makefile diff -u src/external/cddl/osnet/usr.bin/ctfconvert/Makefile:1.8 src/external/cddl/osnet/usr.bin/ctfconvert/Makefile:1.9 --- src/external/cddl/osnet/usr.bin/ctfconvert/Makefile:1.8 Mon May 28 21:05:11 2018 +++ src/external/cddl/osnet/usr.bin/ctfconvert/Makefile Sun Feb 9 07:55:13 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.8 2018/05/28 21:05:11 chs Exp $ +# $NetBSD: Makefile,v 1.9 2020/02/09 07:55:13 fox Exp $ # $FreeBSD: head/cddl/usr.bin/ctfconvert/Makefile 314654 2017-03-04 11:30:04Z ngie $ @@ -34,6 +34,7 @@ SRCS= alist.c \ traverse.c \ util.c +COPTS.dwarf.c += ${GCC_NO_STRINGOP_TRUNCATION} COPTS.st_parse.c += -Wno-format-nonliteral COPTS.util.c += -Wno-format-nonliteral
CVS commit: src/external/bsd/ipf/bin/ipsend
Module Name:src Committed By: fox Date: Sun Feb 9 07:51:20 UTC 2020 Modified Files: src/external/bsd/ipf/bin/ipsend: Makefile Log Message: external/bsd/ipf: Suppress -Werror=maybe-uninitialized error. Add -Wno-error=maybe-uninitialized in ipsopt.c to prevent build failure. Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/ipf/bin/ipsend/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/ipf/bin/ipsend/Makefile diff -u src/external/bsd/ipf/bin/ipsend/Makefile:1.3 src/external/bsd/ipf/bin/ipsend/Makefile:1.4 --- src/external/bsd/ipf/bin/ipsend/Makefile:1.3 Wed Jan 2 15:50:34 2013 +++ src/external/bsd/ipf/bin/ipsend/Makefile Sun Feb 9 07:51:20 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2013/01/02 15:50:34 dsl Exp $ +# $NetBSD: Makefile,v 1.4 2020/02/09 07:51:20 fox Exp $ .include .include "../Makefile.inc" @@ -25,6 +25,8 @@ DPSRCS+= iplang_y.h .PATH: ${UDIST}/ipsend \ ${UDIST}/iplang +COPTS.ipsopt.c+= -Wno-error=maybe-uninitialized + iplang_y.c: iplang_y.y ${_MKTARGET_CREATE} ${YACC} -d ${.ALLSRC}
CVS commit: src/external/bsd/ipf/bin/ipmon
Module Name:src Committed By: fox Date: Sun Feb 9 07:47:50 UTC 2020 Modified Files: src/external/bsd/ipf/bin/ipmon: Makefile Log Message: external/bsd/ipf: Suppress -Werror=format-overflow= error. Add -Wno-error=format-overflow in ipmon.c to prevent build failure. Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/bsd/ipf/bin/ipmon/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/ipf/bin/ipmon/Makefile diff -u src/external/bsd/ipf/bin/ipmon/Makefile:1.1 src/external/bsd/ipf/bin/ipmon/Makefile:1.2 --- src/external/bsd/ipf/bin/ipmon/Makefile:1.1 Fri Mar 23 21:29:45 2012 +++ src/external/bsd/ipf/bin/ipmon/Makefile Sun Feb 9 07:47:50 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2012/03/23 21:29:45 christos Exp $ +# $NetBSD: Makefile,v 1.2 2020/02/09 07:47:50 fox Exp $ PROG= ipmon SRCS= ipmon.c ipmon_y.c ipmon_l.c @@ -11,6 +11,8 @@ DPSRCS+= ipmon_l.h ipmon_y.h CLEANFILES+= ipmon_y.c ipmon_y.h CLEANFILES+= ipmon_l.c ipmon_l.h +COPTS.ipmon.c+= -Wno-error=format-overflow + ipmon_y.c: ipmon_y.y ${_MKTARGET_CREATE} ${YACC} -d ${.ALLSRC}
CVS commit: src/usr.bin/tftp
Module Name:src Committed By: fox Date: Sat Feb 8 13:33:56 UTC 2020 Modified Files: src/usr.bin/tftp: Makefile Log Message: user.bin/tftp: Suppress -Werror=format-overflow error. Add -Wno-error=format-overflow tftp.c to prevent build failure. Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/usr.bin/tftp/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/tftp/Makefile diff -u src/usr.bin/tftp/Makefile:1.12 src/usr.bin/tftp/Makefile:1.13 --- src/usr.bin/tftp/Makefile:1.12 Fri Oct 4 09:47:28 2019 +++ src/usr.bin/tftp/Makefile Sat Feb 8 13:33:56 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.12 2019/10/04 09:47:28 mrg Exp $ +# $NetBSD: Makefile,v 1.13 2020/02/08 13:33:56 fox Exp $ # @(#)Makefile 8.1 (Berkeley) 6/6/93 WARNS?=2 @@ -9,5 +9,6 @@ PROG= tftp SRCS= main.c tftp.c tftpsubs.c COPTS.tftp.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-array-bounds :} +COPTS.tftp.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=format-overflow :} .include
CVS commit: src/external/bsd/ntp/bin/ntpd
Module Name:src Committed By: fox Date: Sat Feb 8 13:20:10 UTC 2020 Modified Files: src/external/bsd/ntp/bin/ntpd: Makefile Log Message: external/bsd/ntp: Suppress -Werror=stringop-truncation error. Add GCC_NO_STRINGOP_TRUNCATION to refclock_jjy.c to prevent build failure. Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/external/bsd/ntp/bin/ntpd/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/ntp/bin/ntpd/Makefile diff -u src/external/bsd/ntp/bin/ntpd/Makefile:1.24 src/external/bsd/ntp/bin/ntpd/Makefile:1.25 --- src/external/bsd/ntp/bin/ntpd/Makefile:1.24 Sun Oct 13 07:28:07 2019 +++ src/external/bsd/ntp/bin/ntpd/Makefile Sat Feb 8 13:20:10 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.24 2019/10/13 07:28:07 mrg Exp $ +# $NetBSD: Makefile,v 1.25 2020/02/08 13:20:10 fox Exp $ .include @@ -95,6 +95,7 @@ COPTS.ntp_control.c+= -Wno-error=maybe- COPTS.ntp_loopfilter.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=restrict :} COPTS.ntp_loopfilter.c+= ${GCC_NO_FORMAT_TRUNCATION} COPTS.ntp_crypto.c+= ${GCC_NO_FORMAT_TRUNCATION} +COPTS.refclock_jjy.c+= ${GCC_NO_STRINGOP_TRUNCATION} COPTS.refclock_parse.c+= ${GCC_NO_FORMAT_TRUNCATION} COPTS.refclock_leitch.c+= ${GCC_NO_FORMAT_TRUNCATION} COPTS.refclock_neoclock4x.c+= ${GCC_NO_FORMAT_TRUNCATION}
CVS commit: src/usr.sbin/fstyp
Module Name:src Committed By: fox Date: Sat Feb 8 12:56:56 UTC 2020 Modified Files: src/usr.sbin/fstyp: exfat.c Log Message: usr.sbin/fstyp: Fix -Werror=conversion error. Type cast the size_t to uint32_t to prevent implicit type conversion errors. Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/fstyp/exfat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/fstyp/exfat.c diff -u src/usr.sbin/fstyp/exfat.c:1.2 src/usr.sbin/fstyp/exfat.c:1.3 --- src/usr.sbin/fstyp/exfat.c:1.2 Sat Dec 28 08:00:08 2019 +++ src/usr.sbin/fstyp/exfat.c Sat Feb 8 12:56:56 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: exfat.c,v 1.2 2019/12/28 08:00:08 tkusumi Exp $ */ +/* $NetBSD: exfat.c,v 1.3 2020/02/08 12:56:56 fox Exp $ */ /* * Copyright (c) 2017 Conrad Meyer @@ -26,7 +26,7 @@ * SUCH DAMAGE. */ #include -__RCSID("$NetBSD: exfat.c,v 1.2 2019/12/28 08:00:08 tkusumi Exp $"); +__RCSID("$NetBSD: exfat.c,v 1.3 2020/02/08 12:56:56 fox Exp $"); #include #include @@ -250,7 +250,7 @@ exfat_fat_next(FILE *fp, const struct ex fat_offset_sect = le32toh(ev->ev_fat_offset); clsect = fat_offset_sect + (cluster / (BPS / (uint32_t)sizeof(cluster))); - clsectoff = (cluster % (BPS / sizeof(cluster))); + clsectoff = (cluster % (BPS / (uint32_t)sizeof(cluster))); /* XXX This is pretty wasteful without a block cache for the FAT. */ fatsect = read_sect(fp, clsect, BPS);
CVS commit: src/usr.bin/talk
Module Name:src Committed By: fox Date: Sat Feb 8 12:53:29 UTC 2020 Modified Files: src/usr.bin/talk: Makefile Log Message: usr.bin/talk: Suppress -Werror=stringop-truncation error. Add GCC_NO_STRINGOP_TRUNCATION to get_names.c to prevent build failure. Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/usr.bin/talk/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/talk/Makefile diff -u src/usr.bin/talk/Makefile:1.8 src/usr.bin/talk/Makefile:1.9 --- src/usr.bin/talk/Makefile:1.8 Sat Feb 6 23:45:26 2010 +++ src/usr.bin/talk/Makefile Sat Feb 8 12:53:29 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.8 2010/02/06 23:45:26 he Exp $ +# $NetBSD: Makefile,v 1.9 2020/02/08 12:53:29 fox Exp $ # @(#)Makefile 8.1 (Berkeley) 6/6/93 USE_FORT?= yes # network client @@ -9,4 +9,6 @@ LDADD= -lcurses -lterminfo -lutil SRCS= ctl.c ctl_transact.c display.c get_addrs.c get_names.c \ init_disp.c invite.c io.c look_up.c msgs.c talk.c +COPTS.get_names.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include
CVS commit: src/external/bsd/dhcpcd/dist/src
Module Name:src Committed By: fox Date: Sat Feb 8 12:17:16 UTC 2020 Modified Files: src/external/bsd/dhcpcd/dist/src: dhcp.c Log Message: external/bsd/dhcpcd: Fix a -Wconversion warning. Type cast uint16_t to size_t to prevent implicit type conversion. Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag. gcc version 8.3.0 Reviewed by: roy@, kamil@ To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/external/bsd/dhcpcd/dist/src/dhcp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcpcd/dist/src/dhcp.c diff -u src/external/bsd/dhcpcd/dist/src/dhcp.c:1.32 src/external/bsd/dhcpcd/dist/src/dhcp.c:1.33 --- src/external/bsd/dhcpcd/dist/src/dhcp.c:1.32 Mon Jan 27 20:42:56 2020 +++ src/external/bsd/dhcpcd/dist/src/dhcp.c Sat Feb 8 12:17:16 2020 @@ -3307,7 +3307,7 @@ is_packet_udp_bootp(void *packet, size_t memcpy(, (char *)ip + ip_hlen, sizeof(udp)); if (ntohs(udp.uh_ulen) < sizeof(udp)) return false; - if (ip_hlen + ntohs(udp.uh_ulen) > plen) + if (ip_hlen + (size_t)ntohs(udp.uh_ulen) > plen) return false; /* Check it's to and from the right ports. */
CVS commit: src/usr.sbin/altq/altqstat
Module Name:src Committed By: fox Date: Sat Feb 8 01:01:31 UTC 2020 Modified Files: src/usr.sbin/altq/altqstat: Makefile Log Message: usr.sbin/altq: Suppress -Werror=stringop-truncation error. Add GCC_NO_STRINGOP_TRUNCATION to quip_client.c to prevent build failure. Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/altq/altqstat/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/altq/altqstat/Makefile diff -u src/usr.sbin/altq/altqstat/Makefile:1.4 src/usr.sbin/altq/altqstat/Makefile:1.5 --- src/usr.sbin/altq/altqstat/Makefile:1.4 Sat Feb 6 23:45:26 2010 +++ src/usr.sbin/altq/altqstat/Makefile Sat Feb 8 01:01:31 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2010/02/06 23:45:26 he Exp $ +# $NetBSD: Makefile,v 1.5 2020/02/08 01:01:31 fox Exp $ PROG= altqstat SRCS= altqstat.c quip_client.c qdisc_conf.c qdisc_cbq.c qdisc_hfsc.c \ @@ -10,4 +10,6 @@ CPPFLAGS+= -DALTQ -I${.CURDIR}/../libalt DPADD+= ${LIBCURSES} ${LIBTERMINFO} ${LIBMATH} LDADD+= -lcurses -lterminfo -lm +COPTS.quip_client.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .include
CVS commit: src/games/hack
Module Name:src Committed By: fox Date: Sat Feb 8 00:59:55 UTC 2020 Modified Files: src/games/hack: Makefile Log Message: games/hack: Suppress -Werror=stringop-truncation error. Add GCC_NO_STRINGOP_TRUNCATION to hack.end.c to prevent build failure. Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/games/hack/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/hack/Makefile diff -u src/games/hack/Makefile:1.46 src/games/hack/Makefile:1.47 --- src/games/hack/Makefile:1.46 Sun Oct 13 07:28:09 2019 +++ src/games/hack/Makefile Sat Feb 8 00:59:55 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.46 2019/10/13 07:28:09 mrg Exp $ +# $NetBSD: Makefile,v 1.47 2020/02/08 00:59:55 fox Exp $ # @(#)Makefile 8.2 (Berkeley) 4/27/95 .include @@ -39,6 +39,7 @@ hack.h: hack.onames.h COPTS.hack.mon.c+= -Wno-format-nonliteral COPTS.hack.rip.c+= -Wno-format-nonliteral +COPTS.hack.end.c+= ${GCC_NO_STRINGOP_TRUNCATION} .if !exists(${DESTDIR}${FILESDIR}/perm) afterinstall: clobber
CVS commit: src/games/hack
Module Name:src Committed By: fox Date: Fri Feb 7 22:04:02 UTC 2020 Modified Files: src/games/hack: hack.end.c Log Message: games/hack: Revert the strlcpy(1) change since this changes expected behavior from strncpy(3). Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/games/hack/hack.end.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/hack/hack.end.c diff -u src/games/hack/hack.end.c:1.18 src/games/hack/hack.end.c:1.19 --- src/games/hack/hack.end.c:1.18 Fri Feb 7 20:34:18 2020 +++ src/games/hack/hack.end.c Fri Feb 7 22:04:02 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: hack.end.c,v 1.18 2020/02/07 20:34:18 fox Exp $ */ +/* $NetBSD: hack.end.c,v 1.19 2020/02/07 22:04:02 fox Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -63,7 +63,7 @@ #include #ifndef lint -__RCSID("$NetBSD: hack.end.c,v 1.18 2020/02/07 20:34:18 fox Exp $"); +__RCSID("$NetBSD: hack.end.c,v 1.19 2020/02/07 22:04:02 fox Exp $"); #endif/* not lint */ #include @@ -362,7 +362,7 @@ topten(void) t0->plchar = pl_character[0]; t0->sex = (flags.female ? 'F' : 'M'); t0->uid = uid; - (void) strlcpy(t0->name, plname, NAMSZ); + (void) strncpy(t0->name, plname, NAMSZ); (t0->name)[NAMSZ] = 0; (void) strncpy(t0->death, killer, DTHSZ); (t0->death)[DTHSZ] = 0;
CVS commit: src/usr.sbin/altq/altqstat
Module Name:src Committed By: fox Date: Fri Feb 7 21:53:20 UTC 2020 Modified Files: src/usr.sbin/altq/altqstat: quip_client.c Log Message: usr.sbin/altq: Revert the strlcpy(3) change since this changes expected behavior from strncpy(3). Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/altq/altqstat/quip_client.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/altq/altqstat/quip_client.c diff -u src/usr.sbin/altq/altqstat/quip_client.c:1.13 src/usr.sbin/altq/altqstat/quip_client.c:1.14 --- src/usr.sbin/altq/altqstat/quip_client.c:1.13 Fri Feb 7 20:13:26 2020 +++ src/usr.sbin/altq/altqstat/quip_client.c Fri Feb 7 21:53:20 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: quip_client.c,v 1.13 2020/02/07 20:13:26 fox Exp $ */ +/* $NetBSD: quip_client.c,v 1.14 2020/02/07 21:53:20 fox Exp $ */ /* $KAME: quip_client.c,v 1.9 2003/05/17 05:59:00 itojun Exp $ */ /* * Copyright (C) 1999-2000 @@ -454,7 +454,8 @@ extract_ifname(const char *name) else len = strlen(name); len = MIN(len, 63); - strlcpy(ifname, name, len); + strncpy(ifname, name, len); + ifname[len] = '\0'; return (ifname); }
CVS commit: src/games/hack
Module Name:src Committed By: fox Date: Fri Feb 7 20:34:18 UTC 2020 Modified Files: src/games/hack: hack.end.c Log Message: games/hack: Fix -Wstringop-truncation warning. Replace strncpy(3) with strlcpy(3). Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/games/hack/hack.end.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/hack/hack.end.c diff -u src/games/hack/hack.end.c:1.17 src/games/hack/hack.end.c:1.18 --- src/games/hack/hack.end.c:1.17 Sat Aug 6 20:42:43 2011 +++ src/games/hack/hack.end.c Fri Feb 7 20:34:18 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: hack.end.c,v 1.17 2011/08/06 20:42:43 dholland Exp $ */ +/* $NetBSD: hack.end.c,v 1.18 2020/02/07 20:34:18 fox Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -63,7 +63,7 @@ #include #ifndef lint -__RCSID("$NetBSD: hack.end.c,v 1.17 2011/08/06 20:42:43 dholland Exp $"); +__RCSID("$NetBSD: hack.end.c,v 1.18 2020/02/07 20:34:18 fox Exp $"); #endif/* not lint */ #include @@ -362,7 +362,7 @@ topten(void) t0->plchar = pl_character[0]; t0->sex = (flags.female ? 'F' : 'M'); t0->uid = uid; - (void) strncpy(t0->name, plname, NAMSZ); + (void) strlcpy(t0->name, plname, NAMSZ); (t0->name)[NAMSZ] = 0; (void) strncpy(t0->death, killer, DTHSZ); (t0->death)[DTHSZ] = 0;
CVS commit: src/usr.bin/config
Module Name:src Committed By: fox Date: Fri Feb 7 20:17:48 UTC 2020 Modified Files: src/usr.bin/config: Makefile Log Message: usr.bin/config: Suppress -Werror=stringop-truncation error. Add GCC_NO_STRINGOP_TRUNCATION to scan.c to prevent build failure. Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag. gcc version 8.3.0 Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/usr.bin/config/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/config/Makefile diff -u src/usr.bin/config/Makefile:1.11 src/usr.bin/config/Makefile:1.12 --- src/usr.bin/config/Makefile:1.11 Sun Oct 13 07:28:14 2019 +++ src/usr.bin/config/Makefile Fri Feb 7 20:17:48 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2019/10/13 07:28:14 mrg Exp $ +# $NetBSD: Makefile,v 1.12 2020/02/07 20:17:48 fox Exp $ # from: @(#)Makefile 8.2 (Berkeley) 4/19/94 .include @@ -17,6 +17,8 @@ YHEADER=1 CPPFLAGS+=-I${.CURDIR} -I. CPPFLAGS+= -I${NETBSDSRCDIR}/usr.bin/cksum +COPTS.scan.c+= ${GCC_NO_STRINGOP_TRUNCATION} + .ifndef HOSTPROG LDADD+=-lutil DPADD+=${LIBUTIL}
CVS commit: src/usr.sbin/altq/altqstat
Module Name:src Committed By: fox Date: Fri Feb 7 20:13:26 UTC 2020 Modified Files: src/usr.sbin/altq/altqstat: quip_client.c Log Message: usr.sbin/altq: Fix -Wstringop-truncation warning. Looks like the original intention was to truncate the string at len. Replace strncpy(3) with strlcpy(3). Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/altq/altqstat/quip_client.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/altq/altqstat/quip_client.c diff -u src/usr.sbin/altq/altqstat/quip_client.c:1.12 src/usr.sbin/altq/altqstat/quip_client.c:1.13 --- src/usr.sbin/altq/altqstat/quip_client.c:1.12 Wed Feb 17 19:51:29 2016 +++ src/usr.sbin/altq/altqstat/quip_client.c Fri Feb 7 20:13:26 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: quip_client.c,v 1.12 2016/02/17 19:51:29 christos Exp $ */ +/* $NetBSD: quip_client.c,v 1.13 2020/02/07 20:13:26 fox Exp $ */ /* $KAME: quip_client.c,v 1.9 2003/05/17 05:59:00 itojun Exp $ */ /* * Copyright (C) 1999-2000 @@ -454,8 +454,7 @@ extract_ifname(const char *name) else len = strlen(name); len = MIN(len, 63); - strncpy(ifname, name, len); - ifname[len] = '\0'; + strlcpy(ifname, name, len); return (ifname); }
CVS commit: src/bin/sh
Module Name:src Committed By: fox Date: Fri Feb 7 01:25:08 UTC 2020 Modified Files: src/bin/sh: main.c Log Message: bin/sh: Fixes -Werror=shadow causing build breaks. Conflicting variable name, sigset_t sigs has been renamed to sigset_t mask Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.84 -r1.85 src/bin/sh/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/main.c diff -u src/bin/sh/main.c:1.84 src/bin/sh/main.c:1.85 --- src/bin/sh/main.c:1.84 Thu Feb 6 20:08:28 2020 +++ src/bin/sh/main.c Fri Feb 7 01:25:08 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.84 2020/02/06 20:08:28 kre Exp $ */ +/* $NetBSD: main.c,v 1.85 2020/02/07 01:25:08 fox Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1991, 19 #if 0 static char sccsid[] = "@(#)main.c 8.7 (Berkeley) 7/19/95"; #else -__RCSID("$NetBSD: main.c,v 1.84 2020/02/06 20:08:28 kre Exp $"); +__RCSID("$NetBSD: main.c,v 1.85 2020/02/07 01:25:08 fox Exp $"); #endif #endif /* not lint */ @@ -108,7 +108,7 @@ main(int argc, char **argv) char *shinit; uid_t uid; gid_t gid; - sigset_t sigs; + sigset_t mask; /* * If we happen to be invoked with SIGCHLD ignored, we cannot @@ -121,9 +121,9 @@ main(int argc, char **argv) /* * Similarly, SIGCHLD must not be blocked */ - sigemptyset(); - sigaddset(, SIGCHLD); - sigprocmask(SIG_UNBLOCK, , NULL); + sigemptyset(); + sigaddset(, SIGCHLD); + sigprocmask(SIG_UNBLOCK, , NULL); uid = getuid(); gid = getgid();
CVS commit: src/games/battlestar
Module Name:src Committed By: fox Date: Thu Feb 6 22:09:43 UTC 2020 Modified Files: src/games/battlestar: parse.c Log Message: games/battlestar: Replace snprintf(3) with strlcpy(3) for better performance. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/games/battlestar/parse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/battlestar/parse.c diff -u src/games/battlestar/parse.c:1.16 src/games/battlestar/parse.c:1.17 --- src/games/battlestar/parse.c:1.16 Wed Feb 5 20:11:54 2020 +++ src/games/battlestar/parse.c Thu Feb 6 22:09:43 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.16 2020/02/05 20:11:54 fox Exp $ */ +/* $NetBSD: parse.c,v 1.17 2020/02/06 22:09:43 fox Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)parse.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: parse.c,v 1.16 2020/02/05 20:11:54 fox Exp $"); +__RCSID("$NetBSD: parse.c,v 1.17 2020/02/06 22:09:43 fox Exp $"); #endif #endif/* not lint */ @@ -120,7 +120,7 @@ parse(void) for (i = n + 1; i < wordcount; i++) { wordtype[i - 1] = wordtype[i]; wordvalue[i - 1] = wordvalue[i]; -snprintf(words[i - 1], WORDLEN, "%s", words[i]); +strlcpy(words[i - 1], words[i], WORDLEN); } wordcount--; } @@ -140,7 +140,7 @@ parse(void) for (i = n + 1; i < wordcount; i++) { wordtype[i - 1] = wordtype[i]; wordvalue[i - 1] = wordvalue[i]; -snprintf(words[i - 1], WORDLEN, "%s", words[i]); +strlcpy(words[i - 1], words[i], WORDLEN); } wordcount--; } @@ -164,7 +164,7 @@ parse(void) wordtype[n + 1] = wordtype[n - 1]; wordtype[n - 1] = OBJECT; strcpy(tmpword, words[n - 1]); -snprintf(words[n - 1], WORDLEN, "%s", words[n + 1]); +strlcpy(words[n - 1], words[n + 1], WORDLEN); strcpy(words[n + 1], tmpword); flag = 1; } @@ -177,7 +177,7 @@ parse(void) for (i = n + 1; i < wordcount; i++) { wordtype[i - 1] = wordtype[i + 1]; wordvalue[i - 1] = wordvalue[i + 1]; - snprintf(words[i - 1], WORDLEN, "%s", words[i + 1]); + strlcpy(words[i - 1], words[i + 1], WORDLEN); } wordcount--; wordcount--;
CVS commit: src/games/battlestar
Module Name:src Committed By: fox Date: Wed Feb 5 20:11:54 UTC 2020 Modified Files: src/games/battlestar: parse.c Log Message: games/battlestar: Fix the -Werror=restrict warning. Replace strcpy(1) with the safer snprintf(3) which guarantees NULL termination of strings. Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/games/battlestar/parse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/battlestar/parse.c diff -u src/games/battlestar/parse.c:1.15 src/games/battlestar/parse.c:1.16 --- src/games/battlestar/parse.c:1.15 Fri Jul 1 06:04:54 2005 +++ src/games/battlestar/parse.c Wed Feb 5 20:11:54 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.15 2005/07/01 06:04:54 jmc Exp $ */ +/* $NetBSD: parse.c,v 1.16 2020/02/05 20:11:54 fox Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)parse.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: parse.c,v 1.15 2005/07/01 06:04:54 jmc Exp $"); +__RCSID("$NetBSD: parse.c,v 1.16 2020/02/05 20:11:54 fox Exp $"); #endif #endif/* not lint */ @@ -120,7 +120,7 @@ parse(void) for (i = n + 1; i < wordcount; i++) { wordtype[i - 1] = wordtype[i]; wordvalue[i - 1] = wordvalue[i]; -strcpy(words[i - 1], words[i]); +snprintf(words[i - 1], WORDLEN, "%s", words[i]); } wordcount--; } @@ -140,7 +140,7 @@ parse(void) for (i = n + 1; i < wordcount; i++) { wordtype[i - 1] = wordtype[i]; wordvalue[i - 1] = wordvalue[i]; -strcpy(words[i - 1], words[i]); +snprintf(words[i - 1], WORDLEN, "%s", words[i]); } wordcount--; } @@ -164,7 +164,7 @@ parse(void) wordtype[n + 1] = wordtype[n - 1]; wordtype[n - 1] = OBJECT; strcpy(tmpword, words[n - 1]); -strcpy(words[n - 1], words[n + 1]); +snprintf(words[n - 1], WORDLEN, "%s", words[n + 1]); strcpy(words[n + 1], tmpword); flag = 1; } @@ -177,7 +177,7 @@ parse(void) for (i = n + 1; i < wordcount; i++) { wordtype[i - 1] = wordtype[i + 1]; wordvalue[i - 1] = wordvalue[i + 1]; - strcpy(words[i - 1], words[i + 1]); + snprintf(words[i - 1], WORDLEN, "%s", words[i + 1]); } wordcount--; wordcount--;
CVS commit: src/bin/csh
Module Name:src Committed By: fox Date: Wed Feb 5 20:06:17 UTC 2020 Modified Files: src/bin/csh: sem.c Log Message: bin/csh: Fix the -Wclobber warning. Mark the variable as volatile as it can be clobbered when a vfork occurs. Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag. Reviewed by: kamil@ To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/bin/csh/sem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/csh/sem.c diff -u src/bin/csh/sem.c:1.31 src/bin/csh/sem.c:1.32 --- src/bin/csh/sem.c:1.31 Sat Jan 5 16:54:00 2019 +++ src/bin/csh/sem.c Wed Feb 5 20:06:17 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: sem.c,v 1.31 2019/01/05 16:54:00 christos Exp $ */ +/* $NetBSD: sem.c,v 1.32 2020/02/05 20:06:17 fox Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)sem.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: sem.c,v 1.31 2019/01/05 16:54:00 christos Exp $"); +__RCSID("$NetBSD: sem.c,v 1.32 2020/02/05 20:06:17 fox Exp $"); #endif #endif /* not lint */ @@ -67,7 +67,7 @@ execute(struct command *t, int wtty, int struct biltins * volatile bifunc; int pv[2], pid; sigset_t nsigset; -int forked; +volatile int forked; UNREGISTER(forked); UNREGISTER(bifunc);
CVS commit: src/tests/sys/uvm
Module Name:src Committed By: fox Date: Wed Jan 16 13:54:17 UTC 2019 Modified Files: src/tests/sys/uvm: t_uvm_physseg.c Log Message: Fixed issues with uvm_page_physunload_delete_end test case. 1. "avail_start" and "start" were different, resulting in unreachable code in uvm_page_physunload(), where the condition check "avail_start" < "end" fails. The test has been fixed by setting "avail_start" and "start" to the same value. 2. If "start" is the address with end address being "start + 2", we can unplug twice, the first paddr_t would be "start" and the second one would be "start + 1". Modified the ATF_CHECK_EQ() to reflect these changes. Reviewed by To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/tests/sys/uvm/t_uvm_physseg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/sys/uvm/t_uvm_physseg.c diff -u src/tests/sys/uvm/t_uvm_physseg.c:1.7 src/tests/sys/uvm/t_uvm_physseg.c:1.8 --- src/tests/sys/uvm/t_uvm_physseg.c:1.7 Wed Jan 16 13:45:29 2019 +++ src/tests/sys/uvm/t_uvm_physseg.c Wed Jan 16 13:54:17 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: t_uvm_physseg.c,v 1.7 2019/01/16 13:45:29 fox Exp $ */ +/* $NetBSD: t_uvm_physseg.c,v 1.8 2019/01/16 13:54:17 fox Exp $ */ /*- * Copyright (c) 2015, 2016 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__RCSID("$NetBSD: t_uvm_physseg.c,v 1.7 2019/01/16 13:45:29 fox Exp $"); +__RCSID("$NetBSD: t_uvm_physseg.c,v 1.8 2019/01/16 13:54:17 fox Exp $"); /* * If this line is commented out tests related to uvm_physseg_get_pmseg() @@ -2155,7 +2155,7 @@ ATF_TC_BODY(uvm_page_physunload_delete_e */ upm = uvm_page_physload(VALID_START_PFN_1, VALID_START_PFN_1 + 2, - VALID_AVAIL_START_PFN_1 + 1, VALID_AVAIL_START_PFN_1 + 2, + VALID_AVAIL_START_PFN_1, VALID_AVAIL_START_PFN_1 + 2, VM_FREELIST_DEFAULT); ATF_REQUIRE_EQ(1, uvm_physseg_get_entries()); @@ -2177,11 +2177,13 @@ ATF_TC_BODY(uvm_page_physunload_delete_e ATF_CHECK_EQ(true, uvm_page_physunload(upm, VM_FREELIST_DEFAULT, )); + ATF_CHECK_EQ(VALID_START_PFN_1, atop(p)); + p = 0; ATF_CHECK_EQ(true, uvm_page_physunload(upm, VM_FREELIST_DEFAULT, )); - ATF_CHECK_EQ(VALID_START_PFN_1 + 2, atop(p)); + ATF_CHECK_EQ(VALID_START_PFN_1 + 1, atop(p)); ATF_CHECK_EQ(1, uvm_physseg_get_entries());
CVS commit: src/tests/sys/uvm
Module Name:src Committed By: fox Date: Wed Jan 16 13:45:29 UTC 2019 Modified Files: src/tests/sys/uvm: t_uvm_physseg.c Log Message: Fixed issues with uvm_physseg_atboot_free_leak test case. "\n" in ATF discriptions make it behave in weird ways, like saying "this test is bogus.", fixed the issue by removing the "\n". Reviewed by To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/tests/sys/uvm/t_uvm_physseg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/sys/uvm/t_uvm_physseg.c diff -u src/tests/sys/uvm/t_uvm_physseg.c:1.6 src/tests/sys/uvm/t_uvm_physseg.c:1.7 --- src/tests/sys/uvm/t_uvm_physseg.c:1.6 Wed Jan 16 13:35:51 2019 +++ src/tests/sys/uvm/t_uvm_physseg.c Wed Jan 16 13:45:29 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: t_uvm_physseg.c,v 1.6 2019/01/16 13:35:51 fox Exp $ */ +/* $NetBSD: t_uvm_physseg.c,v 1.7 2019/01/16 13:45:29 fox Exp $ */ /*- * Copyright (c) 2015, 2016 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__RCSID("$NetBSD: t_uvm_physseg.c,v 1.6 2019/01/16 13:35:51 fox Exp $"); +__RCSID("$NetBSD: t_uvm_physseg.c,v 1.7 2019/01/16 13:45:29 fox Exp $"); /* * If this line is commented out tests related to uvm_physseg_get_pmseg() @@ -401,7 +401,7 @@ ATF_TC(uvm_physseg_atboot_free_leak); ATF_TC_HEAD(uvm_physseg_atboot_free_leak, tc) { atf_tc_set_md_var(tc, "descr", - "does free() leak at boot ?\n" + "does free() leak at boot ?" "This test needs VM_PHYSSEG_MAX > 1)"); }
CVS commit: src/tests/sys/uvm
Module Name:src Committed By: fox Date: Wed Jan 16 13:35:51 UTC 2019 Modified Files: src/tests/sys/uvm: t_uvm_physseg.c Log Message: Fixed issues with uvm_physseg_plug test case. There is a condition check which failed for VM_PHYSSEG_MAX == 2 (not for 1 or 3 and above), in case of 2, pgs == slab + npages1 + npages3, so we need to change ">" check to ">=" check. Reviewed by To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/tests/sys/uvm/t_uvm_physseg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/sys/uvm/t_uvm_physseg.c diff -u src/tests/sys/uvm/t_uvm_physseg.c:1.5 src/tests/sys/uvm/t_uvm_physseg.c:1.6 --- src/tests/sys/uvm/t_uvm_physseg.c:1.5 Wed Jan 16 13:21:02 2019 +++ src/tests/sys/uvm/t_uvm_physseg.c Wed Jan 16 13:35:51 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: t_uvm_physseg.c,v 1.5 2019/01/16 13:21:02 fox Exp $ */ +/* $NetBSD: t_uvm_physseg.c,v 1.6 2019/01/16 13:35:51 fox Exp $ */ /*- * Copyright (c) 2015, 2016 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__RCSID("$NetBSD: t_uvm_physseg.c,v 1.5 2019/01/16 13:21:02 fox Exp $"); +__RCSID("$NetBSD: t_uvm_physseg.c,v 1.6 2019/01/16 13:35:51 fox Exp $"); /* * If this line is commented out tests related to uvm_physseg_get_pmseg() @@ -522,7 +522,7 @@ ATF_TC_BODY(uvm_physseg_plug, tc) ATF_REQUIRE_EQ(uvm_physseg_plug(VALID_START_PFN_4, npages4, ), true); /* The hot plug slab should have nothing to do with the original slab */ pgs = uvm_physseg_get_pg(upm4, 0); - ATF_REQUIRE(pgs < slab || pgs > (slab + npages1 + ATF_REQUIRE(pgs < slab || pgs >= (slab + npages1 #if VM_PHYSSEG_MAX > 2 + npages2 #endif
CVS commit: src/tests/sys/uvm
Module Name:src Committed By: fox Date: Wed Jan 16 13:21:02 UTC 2019 Modified Files: src/tests/sys/uvm: t_uvm_physseg.c Log Message: Fixed the build failures caused by incompatible type comparisons when VM_PHYSSEG is > 1. Reviewed by To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/sys/uvm/t_uvm_physseg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/sys/uvm/t_uvm_physseg.c diff -u src/tests/sys/uvm/t_uvm_physseg.c:1.4 src/tests/sys/uvm/t_uvm_physseg.c:1.5 --- src/tests/sys/uvm/t_uvm_physseg.c:1.4 Tue Dec 18 07:11:35 2018 +++ src/tests/sys/uvm/t_uvm_physseg.c Wed Jan 16 13:21:02 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: t_uvm_physseg.c,v 1.4 2018/12/18 07:11:35 fox Exp $ */ +/* $NetBSD: t_uvm_physseg.c,v 1.5 2019/01/16 13:21:02 fox Exp $ */ /*- * Copyright (c) 2015, 2016 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__RCSID("$NetBSD: t_uvm_physseg.c,v 1.4 2018/12/18 07:11:35 fox Exp $"); +__RCSID("$NetBSD: t_uvm_physseg.c,v 1.5 2019/01/16 13:21:02 fox Exp $"); /* * If this line is commented out tests related to uvm_physseg_get_pmseg() @@ -512,7 +512,7 @@ ATF_TC_BODY(uvm_physseg_plug, tc) #if VM_PHYSSEG_MAX > 2 + npages2 #endif - + npages3, uvmexp.npages); + + npages3, INT_TO_PSIZE_T(uvmexp.npages)); /* Scavenge plug should fit right in the slab */ pgs = uvm_physseg_get_pg(upm3, 0);
CVS commit: src/tests/sys/uvm
Module Name:src Committed By: fox Date: Tue Dec 18 07:11:35 UTC 2018 Modified Files: src/tests/sys/uvm: t_uvm_physseg.c Log Message: Fixed the build failures caused by incompatible type comparisons. Reviewed by To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/sys/uvm/t_uvm_physseg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/sys/uvm/t_uvm_physseg.c diff -u src/tests/sys/uvm/t_uvm_physseg.c:1.3 src/tests/sys/uvm/t_uvm_physseg.c:1.4 --- src/tests/sys/uvm/t_uvm_physseg.c:1.3 Thu Feb 8 09:05:20 2018 +++ src/tests/sys/uvm/t_uvm_physseg.c Tue Dec 18 07:11:35 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: t_uvm_physseg.c,v 1.3 2018/02/08 09:05:20 dholland Exp $ */ +/* $NetBSD: t_uvm_physseg.c,v 1.4 2018/12/18 07:11:35 fox Exp $ */ /*- * Copyright (c) 2015, 2016 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__RCSID("$NetBSD: t_uvm_physseg.c,v 1.3 2018/02/08 09:05:20 dholland Exp $"); +__RCSID("$NetBSD: t_uvm_physseg.c,v 1.4 2018/12/18 07:11:35 fox Exp $"); /* * If this line is commented out tests related to uvm_physseg_get_pmseg() @@ -271,6 +271,11 @@ uvm_physseg_alloc(size_t sz) #endif /* + * This macro was added to convert uvmexp.npages from int to psize_t + */ +#define INT_TO_PSIZE_T(X) (psize_t)X + +/* * Test Fixture SetUp(). */ static void @@ -498,7 +503,7 @@ ATF_TC_BODY(uvm_physseg_plug, tc) #if VM_PHYSSEG_MAX > 2 + npages2 #endif - , uvmexp.npages); + , INT_TO_PSIZE_T(uvmexp.npages)); #if VM_PHYSSEG_MAX > 1 /* Scavenge plug - goes into the same slab */ ATF_REQUIRE_EQ(uvm_physseg_plug(VALID_START_PFN_3, npages3, ), true); @@ -706,7 +711,7 @@ ATF_TC_BODY(uvm_page_physload_postboot, /* Should return a valid handle */ ATF_REQUIRE(uvm_physseg_valid_p(upm)); - ATF_REQUIRE_EQ(npages1 + npages2, uvmexp.npages); + ATF_REQUIRE_EQ(npages1 + npages2, INT_TO_PSIZE_T(uvmexp.npages)); /* After the second call two segments should exist */ ATF_CHECK_EQ(2, uvm_physseg_get_entries()); @@ -889,7 +894,7 @@ ATF_TC_BODY(uvm_physseg_init_seg, tc) uvm_physseg_init_seg(PHYSSEG_NODE_TO_HANDLE(seg), pgs); - ATF_REQUIRE_EQ(npages, uvmexp.npages); + ATF_REQUIRE_EQ(npages, INT_TO_PSIZE_T(uvmexp.npages)); } #if 0 @@ -2279,7 +2284,11 @@ ATF_TC_BODY(uvm_page_physunload_force, t upm = uvm_physseg_find(VALID_AVAIL_END_PFN_1 - 1, NULL); /* It should no longer exist */ +#if defined(UVM_HOTPLUG) ATF_CHECK_EQ(NULL, upm); +#else + ATF_CHECK_EQ(-1, upm); +#endif ATF_CHECK_EQ(1, uvm_physseg_get_entries()); }
CVS commit: src/sys/dev/usb
Module Name:src Committed By: fox Date: Thu Dec 13 16:20:20 UTC 2018 Modified Files: src/sys/dev/usb: usbdevs Log Message: Add Logitech Gamepad F310 and Logitech Dual Action Gamepad To generate a diff of this commit: cvs rdiff -u -r1.762 -r1.763 src/sys/dev/usb/usbdevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/usbdevs diff -u src/sys/dev/usb/usbdevs:1.762 src/sys/dev/usb/usbdevs:1.763 --- src/sys/dev/usb/usbdevs:1.762 Mon Dec 10 14:14:20 2018 +++ src/sys/dev/usb/usbdevs Thu Dec 13 16:20:20 2018 @@ -1,4 +1,4 @@ -$NetBSD: usbdevs,v 1.762 2018/12/10 14:14:20 jakllsch Exp $ +$NetBSD: usbdevs,v 1.763 2018/12/13 16:20:20 fox Exp $ /*- * Copyright (c) 1998-2004 The NetBSD Foundation, Inc. @@ -2152,6 +2152,8 @@ product LOGITECH CDO 0xc504 Cordless De product LOGITECH MX700 0xc506 Cordless optical mouse product LOGITECH CBT44 0xc517 C-BT44 Receiver product LOGITECH QUICKCAMPRO2 0xd001 QuickCam Pro +product LOGITECH GF310 0xc21d Gamepad F310 +product LOGITECH DAG 0xc216 Dual Action Gamepad /* Longcheer products */ product LONGCHEER WM66 0x6061 Longcheer WM66 HSDPA