CVS commit: src/share/misc
Module Name:src Committed By: gutteridge Date: Fri Aug 4 03:59:00 UTC 2023 Modified Files: src/share/misc: acronyms.comp Log Message: acronyms.comp: add ONCE To generate a diff of this commit: cvs rdiff -u -r1.358 -r1.359 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.358 src/share/misc/acronyms.comp:1.359 --- src/share/misc/acronyms.comp:1.358 Thu Aug 3 02:32:16 2023 +++ src/share/misc/acronyms.comp Fri Aug 4 03:59:00 2023 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.358 2023/08/03 02:32:16 gutteridge Exp $ +$NetBSD: acronyms.comp,v 1.359 2023/08/04 03:59:00 gutteridge Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -1138,6 +1138,7 @@ OFET organic field-effect transistor OLAP online analytical processing OLE object linking and embedding OLTP online transaction processing +ONCE on-{chip,circuit} emulation ONFI open nand flash interface OO OpenOffice OO object oriented
CVS commit: src/share/misc
Module Name:src Committed By: gutteridge Date: Fri Aug 4 03:59:00 UTC 2023 Modified Files: src/share/misc: acronyms.comp Log Message: acronyms.comp: add ONCE To generate a diff of this commit: cvs rdiff -u -r1.358 -r1.359 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sbin/bioctl
Module Name:src Committed By: rin Date: Fri Aug 4 03:45:07 UTC 2023 Modified Files: src/sbin/bioctl: bioctl.c Log Message: bioctl(8): bio_show_volumes(): Do not return pointer to stack. Found by GCC 12. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sbin/bioctl/bioctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/bioctl/bioctl.c diff -u src/sbin/bioctl/bioctl.c:1.19 src/sbin/bioctl/bioctl.c:1.20 --- src/sbin/bioctl/bioctl.c:1.19 Tue May 10 14:16:25 2022 +++ src/sbin/bioctl/bioctl.c Fri Aug 4 03:45:07 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: bioctl.c,v 1.19 2022/05/10 14:16:25 msaitoh Exp $ */ +/* $NetBSD: bioctl.c,v 1.20 2023/08/04 03:45:07 rin Exp $ */ /* $OpenBSD: bioctl.c,v 1.52 2007/03/20 15:26:06 jmc Exp $ */ /* @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: bioctl.c,v 1.19 2022/05/10 14:16:25 msaitoh Exp $"); +__RCSID("$NetBSD: bioctl.c,v 1.20 2023/08/04 03:45:07 rin Exp $"); #endif #include @@ -78,7 +78,7 @@ struct locator { __dead static void usage(void); static void bio_alarm(int, int, char **); static void bio_show_common(int, int, char **); -static int bio_show_volumes(struct biotmp *); +static int bio_show_volumes(struct biotmp *, struct bioc_vol *); static void bio_show_disks(struct biotmp *); static void bio_setblink(int, int, char **); static void bio_blink(int, char *, int, int); @@ -232,34 +232,33 @@ str2locator(const char *string, struct l * Shows info about available RAID volumes. */ static int -bio_show_volumes(struct biotmp *bt) +bio_show_volumes(struct biotmp *bt, struct bioc_vol *bv) { - struct bioc_vol bv; const char *status, *rtypestr, *stripestr; char size[64], percent[16], seconds[20]; char rtype[16], stripe[16], tmp[48]; rtypestr = stripestr = NULL; - memset(, 0, sizeof(bv)); - bv.bv_cookie = bl.bl_cookie; - bv.bv_volid = bt->volid; - bv.bv_percent = -1; - bv.bv_seconds = 0; + memset(bv, 0, sizeof(*bv)); + bv->bv_cookie = bl.bl_cookie; + bv->bv_volid = bt->volid; + bv->bv_percent = -1; + bv->bv_seconds = 0; - if (ioctl(bt->fd, BIOCVOL, ) == -1) + if (ioctl(bt->fd, BIOCVOL, bv) == -1) err(EXIT_FAILURE, "BIOCVOL"); percent[0] = '\0'; seconds[0] = '\0'; - if (bv.bv_percent != -1) + if (bv->bv_percent != -1) snprintf(percent, sizeof(percent), - " %3.2f%% done", bv.bv_percent / 10.0); - if (bv.bv_seconds) + " %3.2f%% done", bv->bv_percent / 10.0); + if (bv->bv_seconds) snprintf(seconds, sizeof(seconds), - " %u seconds", bv.bv_seconds); + " %u seconds", bv->bv_seconds); - switch (bv.bv_status) { + switch (bv->bv_status) { case BIOC_SVONLINE: status = BIOC_SVONLINE_S; break; @@ -290,13 +289,13 @@ bio_show_volumes(struct biotmp *bt) break; } - snprintf(bt->volname, sizeof(bt->volname), "%u", bv.bv_volid); - if (bv.bv_vendor[0]) - snprintf(tmp, sizeof(tmp), "%s %s", bv.bv_dev, bv.bv_vendor); + snprintf(bt->volname, sizeof(bt->volname), "%u", bv->bv_volid); + if (bv->bv_vendor[0]) + snprintf(tmp, sizeof(tmp), "%s %s", bv->bv_dev, bv->bv_vendor); else - snprintf(tmp, sizeof(tmp), "%s", bv.bv_dev); + snprintf(tmp, sizeof(tmp), "%s", bv->bv_dev); - switch (bv.bv_level) { + switch (bv->bv_level) { case BIOC_SVOL_HOTSPARE: rtypestr = "Hot spare"; stripestr = "N/A"; @@ -312,8 +311,8 @@ bio_show_volumes(struct biotmp *bt) rtypestr = "RAID 1+0"; break; default: - snprintf(rtype, sizeof(rtype), "RAID %u", bv.bv_level); - if (bv.bv_level == 1 || bv.bv_stripe_size == 0) + snprintf(rtype, sizeof(rtype), "RAID %u", bv->bv_level); + if (bv->bv_level == 1 || bv->bv_stripe_size == 0) stripestr = "N/A"; break; } @@ -323,18 +322,18 @@ bio_show_volumes(struct biotmp *bt) if (stripestr) strlcpy(stripe, stripestr, sizeof(stripe)); else - snprintf(stripe, sizeof(stripe), "%uK", bv.bv_stripe_size); + snprintf(stripe, sizeof(stripe), "%uK", bv->bv_stripe_size); - humanize_number(size, 5, (int64_t)bv.bv_size, "", HN_AUTOSCALE, + humanize_number(size, 5, (int64_t)bv->bv_size, "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); printf("%6s %-12s %4s %20s %8s %6s %s%s\n", bt->volname, status, size, tmp, rtype, stripe, percent, seconds); - bt->bv = + bt->bv = bv; - return bv.bv_nodisk; + return bv->bv_nodisk; } /* @@ -431,6 +430,7 @@ bio_show_common(int fd, int argc, char * { struct biotmp *biot; struct bioc_inq bi; + struct bioc_vol bv; int i, d, ndisks; bool show_all, show_disks; bool show_vols, show_caps; @@ -491,7 +491,7 @@ bio_show_common(int fd, int argc, char * for (i = 0; i < bi.bi_novol; i++) { biot->format = true; biot->volid = i; - ndisks = bio_show_volumes(biot); + ndisks = bio_show_volumes(biot, ); if (show_vols) continue;
CVS commit: src/sbin/bioctl
Module Name:src Committed By: rin Date: Fri Aug 4 03:45:07 UTC 2023 Modified Files: src/sbin/bioctl: bioctl.c Log Message: bioctl(8): bio_show_volumes(): Do not return pointer to stack. Found by GCC 12. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sbin/bioctl/bioctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gcc
Module Name:src Committed By: rin Date: Fri Aug 4 03:39:22 UTC 2023 Modified Files: src/external/gpl3/gcc: README.gcc12 Log Message: README.gcc12: alpha works just fine (incl. boot loaders) Clean up outdated/duplicate notes also. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gcc/README.gcc12 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gcc
Module Name:src Committed By: rin Date: Fri Aug 4 03:39:22 UTC 2023 Modified Files: src/external/gpl3/gcc: README.gcc12 Log Message: README.gcc12: alpha works just fine (incl. boot loaders) Clean up outdated/duplicate notes also. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gcc/README.gcc12 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/README.gcc12 diff -u src/external/gpl3/gcc/README.gcc12:1.4 src/external/gpl3/gcc/README.gcc12:1.5 --- src/external/gpl3/gcc/README.gcc12:1.4 Thu Aug 3 01:36:53 2023 +++ src/external/gpl3/gcc/README.gcc12 Fri Aug 4 03:39:22 2023 @@ -1,4 +1,4 @@ -$NetBSD: README.gcc12,v 1.4 2023/08/03 01:36:53 mrg Exp $ +$NetBSD: README.gcc12,v 1.5 2023/08/04 03:39:22 rin Exp $ new stuff: @@ -33,7 +33,7 @@ architecture tools kernels libgcc native - --- -- --- --- aarch64 y y y y b y y y ? aarch64eb y y y y b y y y ? -alpha y b y y b y ? ? ? +alpha y y y y b y y y ? earmv4 y b ? y ? ? ? ? ? earmv4eb y b ? y ? ? ? ? ? earmv5 y b ? y ? ? ? ? ? @@ -70,14 +70,12 @@ riscv64 y y y y ? bs ? ? ? - --- -- --- --- architecture tools kernels libgcc native-gcc/sani make release runs atf -[1]: amd64 crashed in memfd, likely bug in new code [2]: while libsanitizer is not re-ported, "make release" does not include it. [3]: GENERIC.SKI boots just as well as GCC 10. [4]: rs6000 has a new generator for rs6000-builtins.cc and rs6000-builtins.h rs6000-vecdefines.h [5]: GCC itself fails to build: build-print-rtl.c: In constructor 'rtx_writer::rtx_writer(FILE*, int, bool, bool, rtx_reuse_manager*)': build-print-rtl.c:90:3: error: class 'rtx_writer' does not have any field named 'm_rtx_reuse_manager' -[6]: rs6000 has new generator to deal with [7]: fails to build kernels: In file included from sys/arch/powerpc/oea/pmap64.c:4: sys/arch/powerpc/oea/pmap.c:2186:2: error: #error PPC_OEA64 not supported @@ -120,7 +118,7 @@ mips64eb: r mips64el: k r r amigappc bebox evbppc ibmnws macppc mvmeppc ofppc prep rs6000 sandpoint -powerpc: k k k k kn[6] k k k k k +powerpc: k k k k kn[4] k k k k k evbppc macppc ofppc powerpc64: k k n[7]
CVS commit: src/tests/lib/libc/gen
Module Name:src Committed By: rin Date: Fri Aug 4 03:31:13 UTC 2023 Modified Files: src/tests/lib/libc/gen: t_siginfo.c Log Message: t_siginfo:sigfpe_int: Adjust for GCC12 Do not use constant 1 as numerator to raise integer division by zero. GCC >= 12 optimizes (1 / i) into (abs(i) == 1 ? i : 0), even for -O0. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/tests/lib/libc/gen/t_siginfo.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/lib/libc/gen/t_siginfo.c diff -u src/tests/lib/libc/gen/t_siginfo.c:1.48 src/tests/lib/libc/gen/t_siginfo.c:1.49 --- src/tests/lib/libc/gen/t_siginfo.c:1.48 Sun May 7 12:41:49 2023 +++ src/tests/lib/libc/gen/t_siginfo.c Fri Aug 4 03:31:13 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: t_siginfo.c,v 1.48 2023/05/07 12:41:49 skrll Exp $ */ +/* $NetBSD: t_siginfo.c,v 1.49 2023/08/04 03:31:13 rin Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -365,7 +365,6 @@ ATF_TC_HEAD(sigfpe_int, tc) ATF_TC_BODY(sigfpe_int, tc) { struct sigaction sa; - long l = strtol("0", NULL, 10); #if defined(__aarch64__) || defined(__powerpc__) || defined(__sh3__) atf_tc_skip("Integer division by zero doesn't trap"); @@ -380,7 +379,13 @@ ATF_TC_BODY(sigfpe_int, tc) #elif defined(_FLOAT_IEEE754) fpsetmask(FP_X_INV|FP_X_DZ|FP_X_OFL|FP_X_UFL|FP_X_IMP); #endif - printf("%ld\n", 1 / l); + /* + * Do not use constant 1 here. GCC >= 12 optimizes + * (1 / i) to (abs(i) == 1 ? i : 0), even for -O0. + */ + long unity = strtol("1", NULL, 10), + zero = strtol("0", NULL, 10); + printf("%ld\n", unity / zero); } if (intdiv_signalled == 0) atf_tc_fail("FPE signal handler was not invoked");
CVS commit: src/tests/lib/libc/gen
Module Name:src Committed By: rin Date: Fri Aug 4 03:31:13 UTC 2023 Modified Files: src/tests/lib/libc/gen: t_siginfo.c Log Message: t_siginfo:sigfpe_int: Adjust for GCC12 Do not use constant 1 as numerator to raise integer division by zero. GCC >= 12 optimizes (1 / i) into (abs(i) == 1 ? i : 0), even for -O0. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/tests/lib/libc/gen/t_siginfo.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/wscons
Module Name:src Committed By: uwe Date: Thu Aug 3 22:11:41 UTC 2023 Modified Files: src/sys/dev/wscons: wsemul_vt100_subr.c Log Message: wsemul_vt100_subr: fix comment - CPR is not DSR DSRs (device status report) are 'n', but cursor position report is 'R' To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/dev/wscons/wsemul_vt100_subr.c 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/wscons/wsemul_vt100_subr.c diff -u src/sys/dev/wscons/wsemul_vt100_subr.c:1.33 src/sys/dev/wscons/wsemul_vt100_subr.c:1.34 --- src/sys/dev/wscons/wsemul_vt100_subr.c:1.33 Thu Aug 3 02:25:09 2023 +++ src/sys/dev/wscons/wsemul_vt100_subr.c Thu Aug 3 22:11:41 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: wsemul_vt100_subr.c,v 1.33 2023/08/03 02:25:09 uwe Exp $ */ +/* $NetBSD: wsemul_vt100_subr.c,v 1.34 2023/08/03 22:11:41 uwe Exp $ */ /* * Copyright (c) 1998 @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wsemul_vt100_subr.c,v 1.33 2023/08/03 02:25:09 uwe Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wsemul_vt100_subr.c,v 1.34 2023/08/03 22:11:41 uwe Exp $"); #include #include @@ -612,7 +612,7 @@ wsemul_vt100_handle_csi(struct vt100base /* 0 = OK, 3 = malfunction */ wsdisplay_emulinput(vd->cbcookie, "\033[0n", 4); break; - case 6: { /* DSR cursor position report */ + case 6: { /* CPR cursor position report */ char buf[20]; int row; if (vd->flags & VTFL_DECOM)
CVS commit: src/sys/dev/wscons
Module Name:src Committed By: uwe Date: Thu Aug 3 22:11:41 UTC 2023 Modified Files: src/sys/dev/wscons: wsemul_vt100_subr.c Log Message: wsemul_vt100_subr: fix comment - CPR is not DSR DSRs (device status report) are 'n', but cursor position report is 'R' To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/dev/wscons/wsemul_vt100_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
re: CVS commit: src/share/mk
> > Ah, I only thought about "obvious" impl. Thank you for kind > > explanation! I will revert them for now. > > We should fix those cases that gcc12 found. i was able to fix some of them with some code to apply offsets generated before realloc() or free(), but not in all case. a couple of them were pretty difficult because the alloc and the re-align were not close together. i was going to post about this soon, this is about 10% of the remaining files i have in my tree... i actually don't think the ${CC_..} change was worth reverting, as long as it was using the "-Wno-error=..." method -- ie, the warnings are still displayed, but not as errors (vs, the "-Wno-..." method which elides the warning entirely.) ie, i agree we should fix all these, i'm just not against using the error disable as a temporary measure. thanks. .mrg.
CVS commit: src
Module Name:src Committed By: andvar Date: Thu Aug 3 20:45:50 UTC 2023 Modified Files: src/lib/libm/src: math_private.h src/lib/librumpuser: rumpuser_daemonize.c src/tests/fs/common: fstest_puffs.c src/tests/lib/librumpclient: h_exec.c t_fd.c src/usr.sbin/altq/tbrconfig: tbrconfig.c src/usr.sbin/puffs/rump_syspuffs: rump_syspuffs.c Log Message: fix typos in comments and one definition, mainly s/sucket/socket/. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/lib/libm/src/math_private.h cvs rdiff -u -r1.7 -r1.8 src/lib/librumpuser/rumpuser_daemonize.c cvs rdiff -u -r1.13 -r1.14 src/tests/fs/common/fstest_puffs.c cvs rdiff -u -r1.6 -r1.7 src/tests/lib/librumpclient/h_exec.c cvs rdiff -u -r1.7 -r1.8 src/tests/lib/librumpclient/t_fd.c cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/altq/tbrconfig/tbrconfig.c cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/puffs/rump_syspuffs/rump_syspuffs.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/libm/src/math_private.h diff -u src/lib/libm/src/math_private.h:1.26 src/lib/libm/src/math_private.h:1.27 --- src/lib/libm/src/math_private.h:1.26 Sat Aug 27 08:31:59 2022 +++ src/lib/libm/src/math_private.h Thu Aug 3 20:45:49 2023 @@ -11,7 +11,7 @@ /* * from: @(#)fdlibm.h 5.1 93/09/24 - * $NetBSD: math_private.h,v 1.26 2022/08/27 08:31:59 christos Exp $ + * $NetBSD: math_private.h,v 1.27 2023/08/03 20:45:49 andvar Exp $ */ #ifndef _MATH_PRIVATE_H_ @@ -462,7 +462,7 @@ rnintf(float x) * The complications for extra precision are smaller for rnintl() since it * can safely assume that the rounding precision has been increased from * its default to FP_PE on x86. We don't exploit that here to get small - * optimizations from limiting the rangle to double. We just need it for + * optimizations from limiting the range to double. We just need it for * the magic number to work with long doubles. ld128 callers should use * rnint() instead of this if possible. ld80 callers should prefer * rnintl() since for amd64 this avoids swapping the register set, while Index: src/lib/librumpuser/rumpuser_daemonize.c diff -u src/lib/librumpuser/rumpuser_daemonize.c:1.7 src/lib/librumpuser/rumpuser_daemonize.c:1.8 --- src/lib/librumpuser/rumpuser_daemonize.c:1.7 Tue Nov 4 19:05:17 2014 +++ src/lib/librumpuser/rumpuser_daemonize.c Thu Aug 3 20:45:49 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser_daemonize.c,v 1.7 2014/11/04 19:05:17 pooka Exp $ */ +/* $NetBSD: rumpuser_daemonize.c,v 1.8 2023/08/03 20:45:49 andvar Exp $ */ /* * Copyright (c) 2010 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ #include "rumpuser_port.h" #if !defined(lint) -__RCSID("$NetBSD: rumpuser_daemonize.c,v 1.7 2014/11/04 19:05:17 pooka Exp $"); +__RCSID("$NetBSD: rumpuser_daemonize.c,v 1.8 2023/08/03 20:45:49 andvar Exp $"); #endif /* !lint */ #include @@ -71,7 +71,7 @@ rumpuser_daemonize_begin(void) * after rump_init (which creates threads), do it now. Add * a little pipe trickery to make sure we don't exit until the * service is fully inited (i.e. interlocked daemonization). - * Actually, use sucketpair since that allows to easily steer + * Actually, use socketpair since that allows to easily steer * clear of the dreaded sigpipe. * * Note: We do *NOT* host chdir("/"). It's up to the caller to Index: src/tests/fs/common/fstest_puffs.c diff -u src/tests/fs/common/fstest_puffs.c:1.13 src/tests/fs/common/fstest_puffs.c:1.14 --- src/tests/fs/common/fstest_puffs.c:1.13 Wed Jun 17 00:16:21 2020 +++ src/tests/fs/common/fstest_puffs.c Thu Aug 3 20:45:50 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: fstest_puffs.c,v 1.13 2020/06/17 00:16:21 kamil Exp $ */ +/* $NetBSD: fstest_puffs.c,v 1.14 2023/08/03 20:45:50 andvar Exp $ */ /* * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. @@ -265,7 +265,7 @@ donewfs(const atf_tc_t *tc, void **argp, pflags = >pta_pflags; - /* Create sucketpair for communication with the real file server */ + /* Create socketpair for communication with the real file server */ if (socketpair(PF_LOCAL, SOCK_STREAM, 0, sv) == -1) return errno; Index: src/tests/lib/librumpclient/h_exec.c diff -u src/tests/lib/librumpclient/h_exec.c:1.6 src/tests/lib/librumpclient/h_exec.c:1.7 --- src/tests/lib/librumpclient/h_exec.c:1.6 Wed Feb 16 17:57:44 2011 +++ src/tests/lib/librumpclient/h_exec.c Thu Aug 3 20:45:50 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: h_exec.c,v 1.6 2011/02/16 17:57:44 pooka Exp $ */ +/* $NetBSD: h_exec.c,v 1.7 2023/08/03 20:45:50 andvar Exp $ */ /* * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ main(int argc, char *argv[]) } } - /* open and listenize two TCP4 suckets */ + /* open and listenize two TCP4 sockets */ if ((s1 = rump_sys_socket(PF_INET, SOCK_STREAM, 0)) == -1) err(1, "socket 1"); if ((s2 = rump_sys_socket(PF_INET,
CVS commit: src
Module Name:src Committed By: andvar Date: Thu Aug 3 20:45:50 UTC 2023 Modified Files: src/lib/libm/src: math_private.h src/lib/librumpuser: rumpuser_daemonize.c src/tests/fs/common: fstest_puffs.c src/tests/lib/librumpclient: h_exec.c t_fd.c src/usr.sbin/altq/tbrconfig: tbrconfig.c src/usr.sbin/puffs/rump_syspuffs: rump_syspuffs.c Log Message: fix typos in comments and one definition, mainly s/sucket/socket/. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/lib/libm/src/math_private.h cvs rdiff -u -r1.7 -r1.8 src/lib/librumpuser/rumpuser_daemonize.c cvs rdiff -u -r1.13 -r1.14 src/tests/fs/common/fstest_puffs.c cvs rdiff -u -r1.6 -r1.7 src/tests/lib/librumpclient/h_exec.c cvs rdiff -u -r1.7 -r1.8 src/tests/lib/librumpclient/t_fd.c cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/altq/tbrconfig/tbrconfig.c cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/puffs/rump_syspuffs/rump_syspuffs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: rillig Date: Thu Aug 3 18:48:42 UTC 2023 Modified Files: src/distrib/sets/lists/tests: mi src/tests/usr.bin/xlint/lint1: c11.c t_usage.sh src/usr.bin/xlint/lint1: cgram.y err.c Added Files: src/tests/usr.bin/xlint/lint1: msg_354.c msg_355.c Log Message: lint: make '_Static_assert' only available in C11 or C23 mode To generate a diff of this commit: cvs rdiff -u -r1.1283 -r1.1284 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/c11.c cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/msg_354.c \ src/tests/usr.bin/xlint/lint1/msg_355.c cvs rdiff -u -r1.10 -r1.11 src/tests/usr.bin/xlint/lint1/t_usage.sh cvs rdiff -u -r1.469 -r1.470 src/usr.bin/xlint/lint1/cgram.y cvs rdiff -u -r1.215 -r1.216 src/usr.bin/xlint/lint1/err.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: rillig Date: Thu Aug 3 18:48:42 UTC 2023 Modified Files: src/distrib/sets/lists/tests: mi src/tests/usr.bin/xlint/lint1: c11.c t_usage.sh src/usr.bin/xlint/lint1: cgram.y err.c Added Files: src/tests/usr.bin/xlint/lint1: msg_354.c msg_355.c Log Message: lint: make '_Static_assert' only available in C11 or C23 mode To generate a diff of this commit: cvs rdiff -u -r1.1283 -r1.1284 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/c11.c cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/msg_354.c \ src/tests/usr.bin/xlint/lint1/msg_355.c cvs rdiff -u -r1.10 -r1.11 src/tests/usr.bin/xlint/lint1/t_usage.sh cvs rdiff -u -r1.469 -r1.470 src/usr.bin/xlint/lint1/cgram.y cvs rdiff -u -r1.215 -r1.216 src/usr.bin/xlint/lint1/err.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.1283 src/distrib/sets/lists/tests/mi:1.1284 --- src/distrib/sets/lists/tests/mi:1.1283 Thu Aug 3 13:13:05 2023 +++ src/distrib/sets/lists/tests/mi Thu Aug 3 18:48:42 2023 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1283 2023/08/03 13:13:05 rin Exp $ +# $NetBSD: mi,v 1.1284 2023/08/03 18:48:42 rillig Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -7444,6 +7444,8 @@ ./usr/tests/usr.bin/xlint/lint1/msg_351.c tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/msg_352.c tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/msg_353.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/xlint/lint1/msg_354.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/xlint/lint1/msg_355.c tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/op_colon.c tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/op_colon.exp tests-obsolete obsolete,atf ./usr/tests/usr.bin/xlint/lint1/op_shl_lp64.c tests-usr.bin-tests compattestfile,atf Index: src/tests/usr.bin/xlint/lint1/c11.c diff -u src/tests/usr.bin/xlint/lint1/c11.c:1.4 src/tests/usr.bin/xlint/lint1/c11.c:1.5 --- src/tests/usr.bin/xlint/lint1/c11.c:1.4 Fri Jul 28 22:05:44 2023 +++ src/tests/usr.bin/xlint/lint1/c11.c Thu Aug 3 18:48:42 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: c11.c,v 1.4 2023/07/28 22:05:44 rillig Exp $ */ +/* $NetBSD: c11.c,v 1.5 2023/08/03 18:48:42 rillig Exp $ */ # 3 "c11.c" /* @@ -43,9 +43,10 @@ three_times(void) } -_Static_assert(1 > 0, "string"); -/* XXX: requires C23 or later */ -_Static_assert(1 > 0); +struct static_assert_tag { + _Static_assert(1 > 0, "string"); + int member; +}; // C11 6.7.6.1p3 Index: src/tests/usr.bin/xlint/lint1/t_usage.sh diff -u src/tests/usr.bin/xlint/lint1/t_usage.sh:1.10 src/tests/usr.bin/xlint/lint1/t_usage.sh:1.11 --- src/tests/usr.bin/xlint/lint1/t_usage.sh:1.10 Sun Jul 2 23:40:23 2023 +++ src/tests/usr.bin/xlint/lint1/t_usage.sh Thu Aug 3 18:48:42 2023 @@ -1,4 +1,4 @@ -# $NetBSD: t_usage.sh,v 1.10 2023/07/02 23:40:23 rillig Exp $ +# $NetBSD: t_usage.sh,v 1.11 2023/08/03 18:48:42 rillig Exp $ # # Copyright (c) 2023 The NetBSD Foundation, Inc. # All rights reserved. @@ -39,13 +39,13 @@ suppress_messages_body() # The largest known message. atf_check \ - "$lint1" -X 353 code.c /dev/null + "$lint1" -X 355 code.c /dev/null # Larger than the largest known message. atf_check \ -s 'exit:1' \ - -e "inline:lint1: invalid message ID '354'\n" \ - "$lint1" -X 354 code.c /dev/null + -e "inline:lint1: invalid message ID '356'\n" \ + "$lint1" -X 356 code.c /dev/null # Whitespace is not allowed before a message ID. atf_check \ Index: src/usr.bin/xlint/lint1/cgram.y diff -u src/usr.bin/xlint/lint1/cgram.y:1.469 src/usr.bin/xlint/lint1/cgram.y:1.470 --- src/usr.bin/xlint/lint1/cgram.y:1.469 Wed Aug 2 21:11:35 2023 +++ src/usr.bin/xlint/lint1/cgram.y Thu Aug 3 18:48:42 2023 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: cgram.y,v 1.469 2023/08/02 21:11:35 rillig Exp $ */ +/* $NetBSD: cgram.y,v 1.470 2023/08/03 18:48:42 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -35,7 +35,7 @@ #include #if defined(__RCSID) -__RCSID("$NetBSD: cgram.y,v 1.469 2023/08/02 21:11:35 rillig Exp $"); +__RCSID("$NetBSD: cgram.y,v 1.470 2023/08/03 18:48:42 rillig Exp $"); #endif #include @@ -1695,9 +1695,15 @@ designator: /* C99 6.7.8 "Initializati ; static_assert_declaration: - T_STATIC_ASSERT T_LPAREN - constant_expression T_COMMA T_STRING T_RPAREN T_SEMI /* C11 */ -| T_STATIC_ASSERT T_LPAREN constant_expression T_RPAREN T_SEMI /* C23 */ + T_STATIC_ASSERT T_LPAREN constant_expression T_COMMA T_STRING + T_RPAREN T_SEMI { + /* '_Static_assert' requires C11 or later */ + c11ism(354); + } +| T_STATIC_ASSERT T_LPAREN constant_expression T_RPAREN T_SEMI
Re: CVS commit: src/sys/arch
On Thu, Aug 03, 2023 at 08:16:31AM +, matthew green wrote: > Module Name: src > Committed By: mrg > Date: Thu Aug 3 08:16:31 UTC 2023 > > Modified Files: > src/sys/arch/evbarm/gumstix: gumstix_machdep.c > src/sys/arch/evbarm/ixm1200: ixm1200_machdep.c > src/sys/arch/hpcarm/hpcarm: pxa2x0_hpc_machdep.c sa11x0_hpc_machdep.c > src/sys/arch/hppa/stand: Makefile.buildboot > src/sys/arch/m68k/m68k: regdump.c > src/sys/arch/macppc/macppc: cpu.c > > Log Message: > ignore "-Warray-bounds" for various low level platform code that knows > how something is setup but technically is undefined behaviour. the > most common here is "extern int end;" and then using offsets of "" > that are outside the bounds of this 4-byte integer. > > these uses are almost certainly all OK in reality. Are you sure that GCC's optimizer is not going to break any of those assumptions? We had to go through quite some trouble in crtbegin.c for similar patterns? Joerg
Re: CVS commit: src/share/mk
On Thu, Aug 03, 2023 at 23:30:31 +0900, Rin Okuyama wrote: > On 2023/08/03 23:23, Valery Ushakov wrote: > > On Thu, Aug 03, 2023 at 13:33:27 +, Rin Okuyama wrote: > > > > > -Wuse-after-free for GCC 12 is premature. It fires on a common idiom: > > > > > > newbuf = realloc(buf, size); > > > p = newbuf + (p - buf); > > > > > > Let shut this up for GCC 12 (with hoping it gets improved for 13!). > > > > C99 says > > > > J.2 Undefined behavior > > > > [#1] The behavior is undefined in the following > > circumstances: > > [...] > > -- The value of a pointer to an object whose lifetime has > > ended is used (6.2.4). > > > > > > Yes, for the "obvious" implementation of pointers as addresses the > > above idiom happens to work, but it doesn't make that idiom any less > > UB. > > Ah, I only thought about "obvious" impl. Thank you for kind > explanation! I will revert them for now. We should fix those cases that gcc12 found. While it may seem like a stretch of imagination (e.g. compiling C to JVM or something like that, where the pointer is actually a nontrivial object), "fat" function pointers on itanium were a mundane thing and caused their fair share of problems for code that naively assumed trivial "address-only" pointers. I would imagine UB sanitizers will trip up on that idiom too... Thanks! -uwe
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: rin Date: Thu Aug 3 15:07:07 UTC 2023 Modified Files: src/distrib/sets/lists/base: shl.mi src/distrib/sets/lists/debug: shl.mi Log Message: lists: Belatedly catch up with lib*san bump for GCC 12. To generate a diff of this commit: cvs rdiff -u -r1.957 -r1.958 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.318 -r1.319 src/distrib/sets/lists/debug/shl.mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: rin Date: Thu Aug 3 15:07:07 UTC 2023 Modified Files: src/distrib/sets/lists/base: shl.mi src/distrib/sets/lists/debug: shl.mi Log Message: lists: Belatedly catch up with lib*san bump for GCC 12. To generate a diff of this commit: cvs rdiff -u -r1.957 -r1.958 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.318 -r1.319 src/distrib/sets/lists/debug/shl.mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/shl.mi diff -u src/distrib/sets/lists/base/shl.mi:1.957 src/distrib/sets/lists/base/shl.mi:1.958 --- src/distrib/sets/lists/base/shl.mi:1.957 Thu Aug 3 14:14:29 2023 +++ src/distrib/sets/lists/base/shl.mi Thu Aug 3 15:07:06 2023 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.957 2023/08/03 14:14:29 rin Exp $ +# $NetBSD: shl.mi,v 1.958 2023/08/03 15:07:06 rin Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -213,9 +213,9 @@ ./usr/lib/libasan.sobase-sys-shlib compatfile,cxx,gcc=10 ./usr/lib/libasan.sobase-sys-shlib compatfile,cxx,gcc=12 ./usr/lib/libasan.so.5base-sys-shlib compatfile,cxx,gcc=10 -./usr/lib/libasan.so.5base-sys-shlib compatfile,cxx,gcc=12 +./usr/lib/libasan.so.6base-sys-shlib compatfile,cxx,gcc=12 ./usr/lib/libasan.so.5.0 base-sys-shlib compatfile,cxx,gcc=10 -./usr/lib/libasan.so.5.0 base-sys-shlib compatfile,cxx,gcc=12 +./usr/lib/libasan.so.6.0 base-sys-shlib compatfile,cxx,gcc=12 ./usr/lib/libasn1.sobase-krb5-shlib compatfile,kerberos ./usr/lib/libasn1.so.10base-krb5-shlib compatfile,kerberos ./usr/lib/libasn1.so.10.0 base-krb5-shlib compatfile,kerberos @@ -442,9 +442,9 @@ ./usr/lib/liblsan.so.1base-sys-shlib compatfile,obsolete ./usr/lib/liblsan.so.1.0 base-sys-shlib compatfile,obsolete ./usr/lib/liblsan.so.2base-sys-shlib compatfile,cxx,gcc=10 -./usr/lib/liblsan.so.2base-sys-shlib compatfile,cxx,gcc=12 +./usr/lib/liblsan.so.3base-sys-shlib compatfile,cxx,gcc=12 ./usr/lib/liblsan.so.2.0 base-sys-shlib compatfile,cxx,gcc=10 -./usr/lib/liblsan.so.2.0 base-sys-shlib compatfile,cxx,gcc=12 +./usr/lib/liblsan.so.3.0 base-sys-shlib compatfile,cxx,gcc=12 ./usr/lib/liblua.sobase-sys-shlib compatfile ./usr/lib/liblua.so.6base-sys-shlib compatfile ./usr/lib/liblua.so.6.1base-sys-shlib compatfile @@ -936,9 +936,9 @@ ./usr/lib/libubsan.sobase-sys-shlib compatfile,cxx,gcc=10 ./usr/lib/libubsan.sobase-sys-shlib compatfile,cxx,gcc=12 ./usr/lib/libubsan.so.4base-sys-shlib compatfile,cxx,gcc=10 -./usr/lib/libubsan.so.4base-sys-shlib compatfile,cxx,gcc=12 +./usr/lib/libubsan.so.5base-sys-shlib compatfile,cxx,gcc=12 ./usr/lib/libubsan.so.4.0 base-sys-shlib compatfile,cxx,gcc=10 -./usr/lib/libubsan.so.4.0 base-sys-shlib compatfile,cxx,gcc=12 +./usr/lib/libubsan.so.5.0 base-sys-shlib compatfile,cxx,gcc=12 ./usr/lib/libukfs.sobase-sys-shlib compatfile,rump ./usr/lib/libukfs.so.1base-sys-shlib compatfile,rump ./usr/lib/libukfs.so.1.0 base-sys-shlib compatfile,rump Index: src/distrib/sets/lists/debug/shl.mi diff -u src/distrib/sets/lists/debug/shl.mi:1.318 src/distrib/sets/lists/debug/shl.mi:1.319 --- src/distrib/sets/lists/debug/shl.mi:1.318 Thu Aug 3 13:13:05 2023 +++ src/distrib/sets/lists/debug/shl.mi Thu Aug 3 15:07:07 2023 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.318 2023/08/03 13:13:05 rin Exp $ +# $NetBSD: shl.mi,v 1.319 2023/08/03 15:07:07 rin Exp $ ./usr/lib/libbfd_g.a comp-c-debuglib debuglib,compatfile,binutils ./usr/libdata/debug/lib base-sys-usr debug,dynamicroot,compatdir ./usr/libdata/debug/lib/libavl.so.0.0.debug comp-zfs-debug debug,dynamicroot,zfs @@ -71,7 +71,7 @@ ./usr/libdata/debug/usr/lib/libarchive.so.4.0.debug comp-sys-debug debug,compatfile ./usr/libdata/debug/usr/lib/libasan.so.3.0.debug comp-sys-debug debug,compatfile,cxx,obsolete ./usr/libdata/debug/usr/lib/libasan.so.5.0.debug comp-sys-debug debug,compatfile,cxx,gcc=10 -./usr/libdata/debug/usr/lib/libasan.so.5.0.debug comp-sys-debug debug,compatfile,cxx,gcc=12 +./usr/libdata/debug/usr/lib/libasan.so.6.0.debug comp-sys-debug debug,compatfile,cxx,gcc=12 ./usr/libdata/debug/usr/lib/libasn1.so.10.0.debug comp-krb5-debug debug,compatfile,kerberos ./usr/libdata/debug/usr/lib/libatf-c++.so.2.0.debug comp-atf-debug debug,compatfile,atf ./usr/libdata/debug/usr/lib/libatf-c.so.0.0.debug comp-atf-debug debug,compatfile,atf @@ -162,7 +162,7 @@ ./usr/libdata/debug/usr/lib/libldap_r.so.5.0.debug comp-ldap-debug debug,compatfile,ldap ./usr/libdata/debug/usr/lib/liblsan.so.1.0.debug comp-sys-debug debug,compatfile,obsolete ./usr/libdata/debug/usr/lib/liblsan.so.2.0.debug comp-sys-debug debug,compatfile,cxx,gcc=10 -./usr/libdata/debug/usr/lib/liblsan.so.2.0.debug comp-sys-debug debug,compatfile,cxx,gcc=12
CVS commit: src
Module Name:src Committed By: rin Date: Thu Aug 3 14:56:37 UTC 2023 Modified Files: src/external/bsd/pdisk/bin: Makefile src/external/bsd/tre/lib: Makefile src/lib/libc/net: Makefile.inc src/lib/libedit: Makefile src/lib/libkvm: Makefile src/usr.bin/find: Makefile src/usr.bin/mail: Makefile src/usr.bin/rs: Makefile src/usr.bin/sort: Makefile src/usr.sbin/ypserv/ypserv: Makefile Log Message: Revert CC_WNO_USE_AFTER_FREE from Makefile's (thanks uwe@) To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/bsd/pdisk/bin/Makefile cvs rdiff -u -r1.4 -r1.5 src/external/bsd/tre/lib/Makefile cvs rdiff -u -r1.95 -r1.96 src/lib/libc/net/Makefile.inc cvs rdiff -u -r1.69 -r1.70 src/lib/libedit/Makefile cvs rdiff -u -r1.53 -r1.54 src/lib/libkvm/Makefile cvs rdiff -u -r1.14 -r1.15 src/usr.bin/find/Makefile cvs rdiff -u -r1.43 -r1.44 src/usr.bin/mail/Makefile cvs rdiff -u -r1.3 -r1.4 src/usr.bin/rs/Makefile cvs rdiff -u -r1.11 -r1.12 src/usr.bin/sort/Makefile cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/ypserv/ypserv/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: rin Date: Thu Aug 3 14:56:37 UTC 2023 Modified Files: src/external/bsd/pdisk/bin: Makefile src/external/bsd/tre/lib: Makefile src/lib/libc/net: Makefile.inc src/lib/libedit: Makefile src/lib/libkvm: Makefile src/usr.bin/find: Makefile src/usr.bin/mail: Makefile src/usr.bin/rs: Makefile src/usr.bin/sort: Makefile src/usr.sbin/ypserv/ypserv: Makefile Log Message: Revert CC_WNO_USE_AFTER_FREE from Makefile's (thanks uwe@) To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/bsd/pdisk/bin/Makefile cvs rdiff -u -r1.4 -r1.5 src/external/bsd/tre/lib/Makefile cvs rdiff -u -r1.95 -r1.96 src/lib/libc/net/Makefile.inc cvs rdiff -u -r1.69 -r1.70 src/lib/libedit/Makefile cvs rdiff -u -r1.53 -r1.54 src/lib/libkvm/Makefile cvs rdiff -u -r1.14 -r1.15 src/usr.bin/find/Makefile cvs rdiff -u -r1.43 -r1.44 src/usr.bin/mail/Makefile cvs rdiff -u -r1.3 -r1.4 src/usr.bin/rs/Makefile cvs rdiff -u -r1.11 -r1.12 src/usr.bin/sort/Makefile cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/ypserv/ypserv/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/pdisk/bin/Makefile diff -u src/external/bsd/pdisk/bin/Makefile:1.7 src/external/bsd/pdisk/bin/Makefile:1.8 --- src/external/bsd/pdisk/bin/Makefile:1.7 Thu Aug 3 13:36:08 2023 +++ src/external/bsd/pdisk/bin/Makefile Thu Aug 3 14:56:36 2023 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2023/08/03 13:36:08 rin Exp $ +# $NetBSD: Makefile,v 1.8 2023/08/03 14:56:36 rin Exp $ .include WARNS=5 @@ -21,7 +21,6 @@ CPPFLAGS+= -I${SRCDIR} CPPFLAGS+= -D__unix__ COPTS.file_media.c+= ${CC_WNO_IMPLICIT_FALLTHROUGH} -COPTS.io.c+= ${CC_WNO_USE_AFTER_FREE} COPTS.partition_map.c+= ${CC_WNO_STRINGOP_TRUNCATION} COPTS.pathname.c+= ${CC_WNO_IMPLICIT_FALLTHROUGH} COPTS.pdisk.c+= ${CC_WNO_IMPLICIT_FALLTHROUGH} ${CC_WNO_STRINGOP_TRUNCATION} Index: src/external/bsd/tre/lib/Makefile diff -u src/external/bsd/tre/lib/Makefile:1.4 src/external/bsd/tre/lib/Makefile:1.5 --- src/external/bsd/tre/lib/Makefile:1.4 Thu Aug 3 13:36:08 2023 +++ src/external/bsd/tre/lib/Makefile Thu Aug 3 14:56:36 2023 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2023/08/03 13:36:08 rin Exp $ +# $NetBSD: Makefile,v 1.5 2023/08/03 14:56:36 rin Exp $ # for information: # the configure script is run as: @@ -19,6 +19,4 @@ SRCS+= tre-ast.c tre-compile.c tre-match SRCS+= tre-match-backtrack.c tre-match-parallel.c tre-mem.c SRCS+= tre-parse.c tre-stack.c xmalloc.c -COPTS.xmalloc.c+= ${CC_WNO_USE_AFTER_FREE} - .include Index: src/lib/libc/net/Makefile.inc diff -u src/lib/libc/net/Makefile.inc:1.95 src/lib/libc/net/Makefile.inc:1.96 --- src/lib/libc/net/Makefile.inc:1.95 Thu Aug 3 13:36:08 2023 +++ src/lib/libc/net/Makefile.inc Thu Aug 3 14:56:36 2023 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.95 2023/08/03 13:36:08 rin Exp $ +# $NetBSD: Makefile.inc,v 1.96 2023/08/03 14:56:36 rin Exp $ # @(#)Makefile.inc 8.2 (Berkeley) 9/5/93 # net sources @@ -152,5 +152,4 @@ MAN+= sctp_bindx.3 sctp_connectx.3 sctp_ sctp_recvmsg.3 sctp_send.3 sctp_sendmsg.3 COPTS.getaddrinfo.c+= ${CC_WNO_STRINGOP_OVERFLOW} -COPTS.gethnamaddr.c+= ${CC_WNO_USE_AFTER_FREE} COPTS.sctp_sys_calls.c+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER} Index: src/lib/libedit/Makefile diff -u src/lib/libedit/Makefile:1.69 src/lib/libedit/Makefile:1.70 --- src/lib/libedit/Makefile:1.69 Thu Aug 3 13:36:08 2023 +++ src/lib/libedit/Makefile Thu Aug 3 14:56:36 2023 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.69 2023/08/03 13:36:08 rin Exp $ +# $NetBSD: Makefile,v 1.70 2023/08/03 14:56:36 rin Exp $ # @(#)Makefile 8.1 (Berkeley) 6/4/93 USE_SHLIBDIR= yes @@ -144,7 +144,6 @@ COPTS.tokenizer.c+= -Wno-cast-qual COPTS.tokenizern.c+= -Wno-cast-qual .endif -COPTS.chartype.c+= ${CC_WNO_USE_AFTER_FREE} COPTS.history.c+= ${CC_WNO_STRINGOP_OVERFLOW} COPTS.historyn.c+= ${CC_WNO_STRINGOP_OVERFLOW} COPTS.readline.c+= ${CC_WNO_STRINGOP_TRUNCATION} ${CC_WNO_STRINGOP_OVERFLOW} Index: src/lib/libkvm/Makefile diff -u src/lib/libkvm/Makefile:1.53 src/lib/libkvm/Makefile:1.54 --- src/lib/libkvm/Makefile:1.53 Thu Aug 3 13:36:08 2023 +++ src/lib/libkvm/Makefile Thu Aug 3 14:56:36 2023 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.53 2023/08/03 13:36:08 rin Exp $ +# $NetBSD: Makefile,v 1.54 2023/08/03 14:56:36 rin Exp $ # from: @(#)Makefile 8.1 (Berkeley) 6/4/93 WARNS= 3 @@ -76,6 +76,5 @@ CPPFLAGS+= -I. CPPFLAGS+= -D_KMEMUSER .endif -COPTS.kvm_proc.c+= ${CC_WNO_USE_AFTER_FREE} .include Index: src/usr.bin/find/Makefile diff -u src/usr.bin/find/Makefile:1.14 src/usr.bin/find/Makefile:1.15 --- src/usr.bin/find/Makefile:1.14 Thu Aug 3 13:36:08 2023 +++ src/usr.bin/find/Makefile Thu Aug 3 14:56:36 2023 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.14 2023/08/03 13:36:08 rin Exp $ +# $NetBSD: Makefile,v 1.15 2023/08/03 14:56:36 rin
CVS commit: src/share/mk
Module Name:src Committed By: rin Date: Thu Aug 3 14:55:54 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: bsd.own.mk: Revert CC_WNO_USE_AFTER_FREE This is an undefined behavior in general. Implementation details of pointer are not defined in C standards; it is not necessarily address of memory objects. Pointed out by uwe@. Thanks!! To generate a diff of this commit: cvs rdiff -u -r1.1348 -r1.1349 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1348 src/share/mk/bsd.own.mk:1.1349 --- src/share/mk/bsd.own.mk:1.1348 Thu Aug 3 13:33:26 2023 +++ src/share/mk/bsd.own.mk Thu Aug 3 14:55:54 2023 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1348 2023/08/03 13:33:26 rin Exp $ +# $NetBSD: bsd.own.mk,v 1.1349 2023/08/03 14:55:54 rin Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -697,11 +697,6 @@ CC_WNO_RETURN_LOCAL_ADDR= ${${ACTIVE_CC} CC_WNO_STRINGOP_OVERFLOW= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-stringop-overflow :} CC_WNO_STRINGOP_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-stringop-truncation :} -# -Wuse-after-free for GCC 12 is premature. It fires on a common idiom: -# newbuf = realloc(buf, size); p = newbuf + (p - buf); -# Let shut this up for GCC 12 (with hoping it gets improved for 13!). -CC_WNO_USE_AFTER_FREE= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 12:? -Wno-use-after-free :} - # For each ${MACHINE_CPU}, list the ports that use it. MACHINES.aarch64= evbarm MACHINES.alpha= alpha
CVS commit: src/share/mk
Module Name:src Committed By: rin Date: Thu Aug 3 14:55:54 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: bsd.own.mk: Revert CC_WNO_USE_AFTER_FREE This is an undefined behavior in general. Implementation details of pointer are not defined in C standards; it is not necessarily address of memory objects. Pointed out by uwe@. Thanks!! To generate a diff of this commit: cvs rdiff -u -r1.1348 -r1.1349 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/share/mk
On 2023/08/03 23:23, Valery Ushakov wrote: On Thu, Aug 03, 2023 at 13:33:27 +, Rin Okuyama wrote: -Wuse-after-free for GCC 12 is premature. It fires on a common idiom: newbuf = realloc(buf, size); p = newbuf + (p - buf); Let shut this up for GCC 12 (with hoping it gets improved for 13!). C99 says J.2 Undefined behavior [#1] The behavior is undefined in the following circumstances: [...] -- The value of a pointer to an object whose lifetime has ended is used (6.2.4). Yes, for the "obvious" implementation of pointers as addresses the above idiom happens to work, but it doesn't make that idiom any less UB. Ah, I only thought about "obvious" impl. Thank you for kind explanation! I will revert them for now. Thanks, rin
Re: CVS commit: src/share/mk
On Thu, Aug 03, 2023 at 13:33:27 +, Rin Okuyama wrote: > -Wuse-after-free for GCC 12 is premature. It fires on a common idiom: > > newbuf = realloc(buf, size); > p = newbuf + (p - buf); > > Let shut this up for GCC 12 (with hoping it gets improved for 13!). C99 says J.2 Undefined behavior [#1] The behavior is undefined in the following circumstances: [...] -- The value of a pointer to an object whose lifetime has ended is used (6.2.4). Yes, for the "obvious" implementation of pointers as addresses the above idiom happens to work, but it doesn't make that idiom any less UB. -uwe
CVS commit: src/distrib/sets/lists/base
Module Name:src Committed By: rin Date: Thu Aug 3 14:14:29 UTC 2023 Modified Files: src/distrib/sets/lists/base: shl.mi Log Message: base/shl.mi: Fix previous for GCC10... To generate a diff of this commit: cvs rdiff -u -r1.956 -r1.957 src/distrib/sets/lists/base/shl.mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/shl.mi diff -u src/distrib/sets/lists/base/shl.mi:1.956 src/distrib/sets/lists/base/shl.mi:1.957 --- src/distrib/sets/lists/base/shl.mi:1.956 Thu Aug 3 13:13:04 2023 +++ src/distrib/sets/lists/base/shl.mi Thu Aug 3 14:14:29 2023 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.956 2023/08/03 13:13:04 rin Exp $ +# $NetBSD: shl.mi,v 1.957 2023/08/03 14:14:29 rin Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -911,6 +911,7 @@ ./usr/lib/libssl.so.15.0 base-crypto-shlib compatfile,openssl=30 ./usr/lib/libstdc++.sobase-sys-shlib compatfile,gcc,cxx,libstdcxx ./usr/lib/libstdc++.so.9 base-sys-shlib compatfile,gcc,cxx,libstdcxx +./usr/lib/libstdc++.so.9.0 base-sys-shlib compatfile,gcc,cxx,libstdcxx,gcc=10 ./usr/lib/libstdc++.so.9.0 base-sys-shlib compatfile,gcc,cxx,libstdcxx,obsolete,gcc=12 ./usr/lib/libstdc++.so.9.1 base-sys-shlib compatfile,gcc,cxx,libstdcxx,gcc=12 ./usr/lib/libtelnet.sobase-obsolete obsolete
CVS commit: src/distrib/sets/lists/base
Module Name:src Committed By: rin Date: Thu Aug 3 14:14:29 UTC 2023 Modified Files: src/distrib/sets/lists/base: shl.mi Log Message: base/shl.mi: Fix previous for GCC10... To generate a diff of this commit: cvs rdiff -u -r1.956 -r1.957 src/distrib/sets/lists/base/shl.mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: rin Date: Thu Aug 3 13:36:09 UTC 2023 Modified Files: src/external/bsd/pdisk/bin: Makefile src/external/bsd/tre/lib: Makefile src/lib/libc/net: Makefile.inc src/lib/libedit: Makefile src/lib/libkvm: Makefile src/usr.bin/find: Makefile src/usr.bin/mail: Makefile src/usr.bin/rs: Makefile src/usr.bin/sort: Makefile src/usr.sbin/ypserv/ypserv: Makefile Log Message: Sprinkle CC_WNO_USE_AFTER_FREE for GCC 12 All of them are blamed for idiom equivalent to: newbuf = realloc(buf, size); p = newbuf + (p - buf); To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/bsd/pdisk/bin/Makefile cvs rdiff -u -r1.3 -r1.4 src/external/bsd/tre/lib/Makefile cvs rdiff -u -r1.94 -r1.95 src/lib/libc/net/Makefile.inc cvs rdiff -u -r1.68 -r1.69 src/lib/libedit/Makefile cvs rdiff -u -r1.52 -r1.53 src/lib/libkvm/Makefile cvs rdiff -u -r1.13 -r1.14 src/usr.bin/find/Makefile cvs rdiff -u -r1.42 -r1.43 src/usr.bin/mail/Makefile cvs rdiff -u -r1.2 -r1.3 src/usr.bin/rs/Makefile cvs rdiff -u -r1.10 -r1.11 src/usr.bin/sort/Makefile cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/ypserv/ypserv/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/pdisk/bin/Makefile diff -u src/external/bsd/pdisk/bin/Makefile:1.6 src/external/bsd/pdisk/bin/Makefile:1.7 --- src/external/bsd/pdisk/bin/Makefile:1.6 Sat Jun 3 21:30:21 2023 +++ src/external/bsd/pdisk/bin/Makefile Thu Aug 3 13:36:08 2023 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2023/06/03 21:30:21 lukem Exp $ +# $NetBSD: Makefile,v 1.7 2023/08/03 13:36:08 rin Exp $ .include WARNS=5 @@ -21,6 +21,7 @@ CPPFLAGS+= -I${SRCDIR} CPPFLAGS+= -D__unix__ COPTS.file_media.c+= ${CC_WNO_IMPLICIT_FALLTHROUGH} +COPTS.io.c+= ${CC_WNO_USE_AFTER_FREE} COPTS.partition_map.c+= ${CC_WNO_STRINGOP_TRUNCATION} COPTS.pathname.c+= ${CC_WNO_IMPLICIT_FALLTHROUGH} COPTS.pdisk.c+= ${CC_WNO_IMPLICIT_FALLTHROUGH} ${CC_WNO_STRINGOP_TRUNCATION} Index: src/external/bsd/tre/lib/Makefile diff -u src/external/bsd/tre/lib/Makefile:1.3 src/external/bsd/tre/lib/Makefile:1.4 --- src/external/bsd/tre/lib/Makefile:1.3 Tue Nov 21 03:09:41 2017 +++ src/external/bsd/tre/lib/Makefile Thu Aug 3 13:36:08 2023 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2017/11/21 03:09:41 rin Exp $ +# $NetBSD: Makefile,v 1.4 2023/08/03 13:36:08 rin Exp $ # for information: # the configure script is run as: @@ -19,4 +19,6 @@ SRCS+= tre-ast.c tre-compile.c tre-match SRCS+= tre-match-backtrack.c tre-match-parallel.c tre-mem.c SRCS+= tre-parse.c tre-stack.c xmalloc.c +COPTS.xmalloc.c+= ${CC_WNO_USE_AFTER_FREE} + .include Index: src/lib/libc/net/Makefile.inc diff -u src/lib/libc/net/Makefile.inc:1.94 src/lib/libc/net/Makefile.inc:1.95 --- src/lib/libc/net/Makefile.inc:1.94 Sat Jun 3 09:09:09 2023 +++ src/lib/libc/net/Makefile.inc Thu Aug 3 13:36:08 2023 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.94 2023/06/03 09:09:09 lukem Exp $ +# $NetBSD: Makefile.inc,v 1.95 2023/08/03 13:36:08 rin Exp $ # @(#)Makefile.inc 8.2 (Berkeley) 9/5/93 # net sources @@ -152,4 +152,5 @@ MAN+= sctp_bindx.3 sctp_connectx.3 sctp_ sctp_recvmsg.3 sctp_send.3 sctp_sendmsg.3 COPTS.getaddrinfo.c+= ${CC_WNO_STRINGOP_OVERFLOW} +COPTS.gethnamaddr.c+= ${CC_WNO_USE_AFTER_FREE} COPTS.sctp_sys_calls.c+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER} Index: src/lib/libedit/Makefile diff -u src/lib/libedit/Makefile:1.68 src/lib/libedit/Makefile:1.69 --- src/lib/libedit/Makefile:1.68 Tue Jun 20 23:09:14 2023 +++ src/lib/libedit/Makefile Thu Aug 3 13:36:08 2023 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.68 2023/06/20 23:09:14 wiz Exp $ +# $NetBSD: Makefile,v 1.69 2023/08/03 13:36:08 rin Exp $ # @(#)Makefile 8.1 (Berkeley) 6/4/93 USE_SHLIBDIR= yes @@ -144,6 +144,7 @@ COPTS.tokenizer.c+= -Wno-cast-qual COPTS.tokenizern.c+= -Wno-cast-qual .endif +COPTS.chartype.c+= ${CC_WNO_USE_AFTER_FREE} COPTS.history.c+= ${CC_WNO_STRINGOP_OVERFLOW} COPTS.historyn.c+= ${CC_WNO_STRINGOP_OVERFLOW} COPTS.readline.c+= ${CC_WNO_STRINGOP_TRUNCATION} ${CC_WNO_STRINGOP_OVERFLOW} Index: src/lib/libkvm/Makefile diff -u src/lib/libkvm/Makefile:1.52 src/lib/libkvm/Makefile:1.53 --- src/lib/libkvm/Makefile:1.52 Sat Apr 1 09:08:11 2023 +++ src/lib/libkvm/Makefile Thu Aug 3 13:36:08 2023 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.52 2023/04/01 09:08:11 rillig Exp $ +# $NetBSD: Makefile,v 1.53 2023/08/03 13:36:08 rin Exp $ # from: @(#)Makefile 8.1 (Berkeley) 6/4/93 WARNS= 3 @@ -76,5 +76,6 @@ CPPFLAGS+= -I. CPPFLAGS+= -D_KMEMUSER .endif +COPTS.kvm_proc.c+= ${CC_WNO_USE_AFTER_FREE} .include Index: src/usr.bin/find/Makefile diff -u src/usr.bin/find/Makefile:1.13 src/usr.bin/find/Makefile:1.14 --- src/usr.bin/find/Makefile:1.13 Tue Apr 14 22:15:20 2009 +++ src/usr.bin/find/Makefile Thu Aug 3 13:36:08 2023 @@ -1,4 +1,4 @@ -#
CVS commit: src
Module Name:src Committed By: rin Date: Thu Aug 3 13:36:09 UTC 2023 Modified Files: src/external/bsd/pdisk/bin: Makefile src/external/bsd/tre/lib: Makefile src/lib/libc/net: Makefile.inc src/lib/libedit: Makefile src/lib/libkvm: Makefile src/usr.bin/find: Makefile src/usr.bin/mail: Makefile src/usr.bin/rs: Makefile src/usr.bin/sort: Makefile src/usr.sbin/ypserv/ypserv: Makefile Log Message: Sprinkle CC_WNO_USE_AFTER_FREE for GCC 12 All of them are blamed for idiom equivalent to: newbuf = realloc(buf, size); p = newbuf + (p - buf); To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/bsd/pdisk/bin/Makefile cvs rdiff -u -r1.3 -r1.4 src/external/bsd/tre/lib/Makefile cvs rdiff -u -r1.94 -r1.95 src/lib/libc/net/Makefile.inc cvs rdiff -u -r1.68 -r1.69 src/lib/libedit/Makefile cvs rdiff -u -r1.52 -r1.53 src/lib/libkvm/Makefile cvs rdiff -u -r1.13 -r1.14 src/usr.bin/find/Makefile cvs rdiff -u -r1.42 -r1.43 src/usr.bin/mail/Makefile cvs rdiff -u -r1.2 -r1.3 src/usr.bin/rs/Makefile cvs rdiff -u -r1.10 -r1.11 src/usr.bin/sort/Makefile cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/ypserv/ypserv/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/mk
Module Name:src Committed By: rin Date: Thu Aug 3 13:33:27 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: bsd.own.mk: Introduce CC_WNO_USE_AFTER_FREE for GCC12 -Wuse-after-free for GCC 12 is premature. It fires on a common idiom: newbuf = realloc(buf, size); p = newbuf + (p - buf); Let shut this up for GCC 12 (with hoping it gets improved for 13!). To generate a diff of this commit: cvs rdiff -u -r1.1347 -r1.1348 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1347 src/share/mk/bsd.own.mk:1.1348 --- src/share/mk/bsd.own.mk:1.1347 Tue Aug 1 06:52:06 2023 +++ src/share/mk/bsd.own.mk Thu Aug 3 13:33:26 2023 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1347 2023/08/01 06:52:06 mrg Exp $ +# $NetBSD: bsd.own.mk,v 1.1348 2023/08/03 13:33:26 rin Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -697,6 +697,11 @@ CC_WNO_RETURN_LOCAL_ADDR= ${${ACTIVE_CC} CC_WNO_STRINGOP_OVERFLOW= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-stringop-overflow :} CC_WNO_STRINGOP_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-stringop-truncation :} +# -Wuse-after-free for GCC 12 is premature. It fires on a common idiom: +# newbuf = realloc(buf, size); p = newbuf + (p - buf); +# Let shut this up for GCC 12 (with hoping it gets improved for 13!). +CC_WNO_USE_AFTER_FREE= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 12:? -Wno-use-after-free :} + # For each ${MACHINE_CPU}, list the ports that use it. MACHINES.aarch64= evbarm MACHINES.alpha= alpha
CVS commit: src/share/mk
Module Name:src Committed By: rin Date: Thu Aug 3 13:33:27 UTC 2023 Modified Files: src/share/mk: bsd.own.mk Log Message: bsd.own.mk: Introduce CC_WNO_USE_AFTER_FREE for GCC12 -Wuse-after-free for GCC 12 is premature. It fires on a common idiom: newbuf = realloc(buf, size); p = newbuf + (p - buf); Let shut this up for GCC 12 (with hoping it gets improved for 13!). To generate a diff of this commit: cvs rdiff -u -r1.1347 -r1.1348 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: rin Date: Thu Aug 3 13:13:05 UTC 2023 Modified Files: src/distrib/sets/lists/base: shl.mi src/distrib/sets/lists/comp: mi src/distrib/sets/lists/debug: mi shl.mi src/distrib/sets/lists/tests: mi Log Message: Fix lists for HAVE_GCC=12. To generate a diff of this commit: cvs rdiff -u -r1.955 -r1.956 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.2442 -r1.2443 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.412 -r1.413 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.317 -r1.318 src/distrib/sets/lists/debug/shl.mi cvs rdiff -u -r1.1282 -r1.1283 src/distrib/sets/lists/tests/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/shl.mi diff -u src/distrib/sets/lists/base/shl.mi:1.955 src/distrib/sets/lists/base/shl.mi:1.956 --- src/distrib/sets/lists/base/shl.mi:1.955 Wed Aug 2 12:12:52 2023 +++ src/distrib/sets/lists/base/shl.mi Thu Aug 3 13:13:04 2023 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.955 2023/08/02 12:12:52 martin Exp $ +# $NetBSD: shl.mi,v 1.956 2023/08/03 13:13:04 rin Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -211,8 +211,11 @@ ./usr/lib/libarchive.so.4 base-sys-shlib compatfile ./usr/lib/libarchive.so.4.0 base-sys-shlib compatfile ./usr/lib/libasan.sobase-sys-shlib compatfile,cxx,gcc=10 +./usr/lib/libasan.sobase-sys-shlib compatfile,cxx,gcc=12 ./usr/lib/libasan.so.5base-sys-shlib compatfile,cxx,gcc=10 +./usr/lib/libasan.so.5base-sys-shlib compatfile,cxx,gcc=12 ./usr/lib/libasan.so.5.0 base-sys-shlib compatfile,cxx,gcc=10 +./usr/lib/libasan.so.5.0 base-sys-shlib compatfile,cxx,gcc=12 ./usr/lib/libasn1.sobase-krb5-shlib compatfile,kerberos ./usr/lib/libasn1.so.10base-krb5-shlib compatfile,kerberos ./usr/lib/libasn1.so.10.0 base-krb5-shlib compatfile,kerberos @@ -435,10 +438,13 @@ ./usr/lib/libldap_r.so.5 base-ldap-shlib ldap,compatfile ./usr/lib/libldap_r.so.5.0 base-ldap-shlib ldap,compatfile ./usr/lib/liblsan.sobase-sys-shlib compatfile,cxx,gcc=10 +./usr/lib/liblsan.sobase-sys-shlib compatfile,cxx,gcc=12 ./usr/lib/liblsan.so.1base-sys-shlib compatfile,obsolete ./usr/lib/liblsan.so.1.0 base-sys-shlib compatfile,obsolete ./usr/lib/liblsan.so.2base-sys-shlib compatfile,cxx,gcc=10 +./usr/lib/liblsan.so.2base-sys-shlib compatfile,cxx,gcc=12 ./usr/lib/liblsan.so.2.0 base-sys-shlib compatfile,cxx,gcc=10 +./usr/lib/liblsan.so.2.0 base-sys-shlib compatfile,cxx,gcc=12 ./usr/lib/liblua.sobase-sys-shlib compatfile ./usr/lib/liblua.so.6base-sys-shlib compatfile ./usr/lib/liblua.so.6.1base-sys-shlib compatfile @@ -905,7 +911,6 @@ ./usr/lib/libssl.so.15.0 base-crypto-shlib compatfile,openssl=30 ./usr/lib/libstdc++.sobase-sys-shlib compatfile,gcc,cxx,libstdcxx ./usr/lib/libstdc++.so.9 base-sys-shlib compatfile,gcc,cxx,libstdcxx -./usr/lib/libstdc++.so.9.0 base-sys-shlib compatfile,gcc,cxx,libstdcxx,gcc=10 ./usr/lib/libstdc++.so.9.0 base-sys-shlib compatfile,gcc,cxx,libstdcxx,obsolete,gcc=12 ./usr/lib/libstdc++.so.9.1 base-sys-shlib compatfile,gcc,cxx,libstdcxx,gcc=12 ./usr/lib/libtelnet.sobase-obsolete obsolete @@ -928,8 +933,11 @@ ./usr/lib/libtspi.so.3base-sys-shlib compatfile,tpm ./usr/lib/libtspi.so.3.0 base-sys-shlib compatfile,tpm ./usr/lib/libubsan.sobase-sys-shlib compatfile,cxx,gcc=10 +./usr/lib/libubsan.sobase-sys-shlib compatfile,cxx,gcc=12 ./usr/lib/libubsan.so.4base-sys-shlib compatfile,cxx,gcc=10 +./usr/lib/libubsan.so.4base-sys-shlib compatfile,cxx,gcc=12 ./usr/lib/libubsan.so.4.0 base-sys-shlib compatfile,cxx,gcc=10 +./usr/lib/libubsan.so.4.0 base-sys-shlib compatfile,cxx,gcc=12 ./usr/lib/libukfs.sobase-sys-shlib compatfile,rump ./usr/lib/libukfs.so.1base-sys-shlib compatfile,rump ./usr/lib/libukfs.so.1.0 base-sys-shlib compatfile,rump Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.2442 src/distrib/sets/lists/comp/mi:1.2443 --- src/distrib/sets/lists/comp/mi:1.2442 Thu Aug 3 12:24:47 2023 +++ src/distrib/sets/lists/comp/mi Thu Aug 3 13:13:04 2023 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.2442 2023/08/03 12:24:47 nia Exp $ +# $NetBSD: mi,v 1.2443 2023/08/03 13:13:04 rin Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. ./etc/mtree/set.compcomp-sys-root @@ -3838,6 +3838,8 @@ ./usr/lib/libarchive_p.a comp-c-proflib compatfile,profile ./usr/lib/libasan.acomp-c-lib compatfile,cxx,gcc=10 ./usr/lib/libasan_p.acomp-c-proflib compatfile,profile,cxx,gcc=10 +./usr/lib/libasan.acomp-c-lib compatfile,cxx,gcc=12 +./usr/lib/libasan_p.acomp-c-proflib compatfile,profile,cxx,gcc=12 ./usr/lib/libasn1.acomp-krb5-lib compatfile,kerberos
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: rin Date: Thu Aug 3 13:13:05 UTC 2023 Modified Files: src/distrib/sets/lists/base: shl.mi src/distrib/sets/lists/comp: mi src/distrib/sets/lists/debug: mi shl.mi src/distrib/sets/lists/tests: mi Log Message: Fix lists for HAVE_GCC=12. To generate a diff of this commit: cvs rdiff -u -r1.955 -r1.956 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.2442 -r1.2443 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.412 -r1.413 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.317 -r1.318 src/distrib/sets/lists/debug/shl.mi cvs rdiff -u -r1.1282 -r1.1283 src/distrib/sets/lists/tests/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/sets/lists/debug
Module Name:src Committed By: nia Date: Thu Aug 3 12:30:25 UTC 2023 Modified Files: src/distrib/sets/lists/debug: mi Log Message: mark obsolete, don't remove from setlist To generate a diff of this commit: cvs rdiff -u -r1.411 -r1.412 src/distrib/sets/lists/debug/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/debug/mi diff -u src/distrib/sets/lists/debug/mi:1.411 src/distrib/sets/lists/debug/mi:1.412 --- src/distrib/sets/lists/debug/mi:1.411 Thu Aug 3 12:24:47 2023 +++ src/distrib/sets/lists/debug/mi Thu Aug 3 12:30:25 2023 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.411 2023/08/03 12:24:47 nia Exp $ +# $NetBSD: mi,v 1.412 2023/08/03 12:30:25 nia Exp $ ./etc/mtree/set.debug comp-sys-root ./usr/lib comp-sys-usr compatdir ./usr/lib/i18n/libBIG5_g.a comp-c-debuglib debuglib,compatfile @@ -1790,6 +1790,7 @@ ./usr/libdata/debug/usr/tests/kernel/posix_spawn/t_fileactions.debug tests-obsolete obsolete,compattestfile ./usr/libdata/debug/usr/tests/kernel/posix_spawn/t_spawn.debug tests-obsolete obsolete,compattestfile ./usr/libdata/debug/usr/tests/kernel/posix_spawn/t_spawnattr.debug tests-obsolete obsolete,compattestfile +./usr/libdata/debug/usr/tests/kernel/t_epoll.debug tests-obsolete obsolete,compattestfile ./usr/libdata/debug/usr/tests/kernel/t_extattrctl.debug tests-kernel-tests debug,atf,rump ./usr/libdata/debug/usr/tests/kernel/t_extent.debug tests-kernel-tests debug,atf,compattestfile ./usr/libdata/debug/usr/tests/kernel/t_fcntl.debug tests-kernel-tests debug,atf
CVS commit: src/distrib/sets/lists/debug
Module Name:src Committed By: nia Date: Thu Aug 3 12:30:25 UTC 2023 Modified Files: src/distrib/sets/lists/debug: mi Log Message: mark obsolete, don't remove from setlist To generate a diff of this commit: cvs rdiff -u -r1.411 -r1.412 src/distrib/sets/lists/debug/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: nia Date: Thu Aug 3 12:24:47 UTC 2023 Modified Files: src/distrib/sets/lists/comp: mi src/distrib/sets/lists/debug: mi src/distrib/sets/lists/tests: mi src/lib/libc/sys: Makefile.inc src/sys/sys: Makefile src/tests/kernel: Makefile Log Message: Revert addition of epoll to libc until discussion concludes To generate a diff of this commit: cvs rdiff -u -r1.2441 -r1.2442 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.410 -r1.411 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.1281 -r1.1282 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.252 -r1.253 src/lib/libc/sys/Makefile.inc cvs rdiff -u -r1.181 -r1.182 src/sys/sys/Makefile cvs rdiff -u -r1.74 -r1.75 src/tests/kernel/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.2441 src/distrib/sets/lists/comp/mi:1.2442 --- src/distrib/sets/lists/comp/mi:1.2441 Tue Aug 1 17:51:24 2023 +++ src/distrib/sets/lists/comp/mi Thu Aug 3 12:24:47 2023 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.2441 2023/08/01 17:51:24 christos Exp $ +# $NetBSD: mi,v 1.2442 2023/08/03 12:24:47 nia Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. ./etc/mtree/set.compcomp-sys-root @@ -3432,7 +3432,7 @@ ./usr/include/sys/elfdefinitions.h comp-c-include ./usr/include/sys/endian.h comp-c-include ./usr/include/sys/envsys.h comp-c-include -./usr/include/sys/epoll.h comp-c-include +./usr/include/sys/epoll.h comp-obsolete obsolete ./usr/include/sys/errno.h comp-c-include ./usr/include/sys/evcnt.h comp-c-include ./usr/include/sys/event.h comp-c-include @@ -13318,16 +13318,16 @@ ./usr/share/man/html2/dup.html comp-c-htmlman html ./usr/share/man/html2/dup2.html comp-c-htmlman html ./usr/share/man/html2/dup3.html comp-c-htmlman html -./usr/share/man/html2/epoll.html comp-c-htmlman html -./usr/share/man/html2/epoll_create.html comp-c-htmlman html -./usr/share/man/html2/epoll_create1.html comp-c-htmlman html -./usr/share/man/html2/epoll_ctl.html comp-c-htmlman html -./usr/share/man/html2/epoll_data.html comp-c-htmlman html -./usr/share/man/html2/epoll_data_t.html comp-c-htmlman html -./usr/share/man/html2/epoll_event.html comp-c-htmlman html -./usr/share/man/html2/epoll_pwait.html comp-c-htmlman html -./usr/share/man/html2/epoll_pwait2.html comp-c-htmlman html -./usr/share/man/html2/epoll_wait.html comp-c-htmlman html +./usr/share/man/html2/epoll.html comp-obsolete obsolete +./usr/share/man/html2/epoll_create.html comp-obsolete obsolete +./usr/share/man/html2/epoll_create1.html comp-obsolete obsolete +./usr/share/man/html2/epoll_ctl.html comp-obsolete obsolete +./usr/share/man/html2/epoll_data.html comp-obsolete obsolete +./usr/share/man/html2/epoll_data_t.html comp-obsolete obsolete +./usr/share/man/html2/epoll_event.html comp-obsolete obsolete +./usr/share/man/html2/epoll_pwait.html comp-obsolete obsolete +./usr/share/man/html2/epoll_pwait2.html comp-obsolete obsolete +./usr/share/man/html2/epoll_wait.html comp-obsolete obsolete ./usr/share/man/html2/errno.html comp-c-htmlman html ./usr/share/man/html2/eventfd.html comp-c-htmlman html ./usr/share/man/html2/eventfd_read.html comp-c-htmlman html @@ -21643,16 +21643,16 @@ ./usr/share/man/man2/dup.2 comp-c-man .man ./usr/share/man/man2/dup2.2 comp-c-man .man ./usr/share/man/man2/dup3.2 comp-c-man .man -./usr/share/man/man2/epoll.2 comp-c-man .man -./usr/share/man/man2/epoll_create.2 comp-c-man .man -./usr/share/man/man2/epoll_create1.2 comp-c-man .man -./usr/share/man/man2/epoll_ctl.2 comp-c-man .man -./usr/share/man/man2/epoll_data.2 comp-c-man .man -./usr/share/man/man2/epoll_data_t.2 comp-c-man .man -./usr/share/man/man2/epoll_event.2 comp-c-man .man -./usr/share/man/man2/epoll_pwait.2 comp-c-man .man -./usr/share/man/man2/epoll_pwait2.2 comp-c-man .man -./usr/share/man/man2/epoll_wait.2 comp-c-man .man +./usr/share/man/man2/epoll.2 comp-obsolete obsolete +./usr/share/man/man2/epoll_create.2 comp-obsolete obsolete +./usr/share/man/man2/epoll_create1.2 comp-obsolete obsolete +./usr/share/man/man2/epoll_ctl.2 comp-obsolete obsolete +./usr/share/man/man2/epoll_data.2 comp-obsolete obsolete +./usr/share/man/man2/epoll_data_t.2 comp-obsolete obsolete +./usr/share/man/man2/epoll_event.2 comp-obsolete obsolete +./usr/share/man/man2/epoll_pwait.2 comp-obsolete obsolete +./usr/share/man/man2/epoll_pwait2.2 comp-obsolete obsolete +./usr/share/man/man2/epoll_wait.2 comp-obsolete obsolete ./usr/share/man/man2/errno.2 comp-c-man .man ./usr/share/man/man2/eventfd.2 comp-c-man .man ./usr/share/man/man2/eventfd_read.2 comp-c-man .man Index: src/distrib/sets/lists/debug/mi diff -u src/distrib/sets/lists/debug/mi:1.410
CVS commit: src
Module Name:src Committed By: nia Date: Thu Aug 3 12:24:47 UTC 2023 Modified Files: src/distrib/sets/lists/comp: mi src/distrib/sets/lists/debug: mi src/distrib/sets/lists/tests: mi src/lib/libc/sys: Makefile.inc src/sys/sys: Makefile src/tests/kernel: Makefile Log Message: Revert addition of epoll to libc until discussion concludes To generate a diff of this commit: cvs rdiff -u -r1.2441 -r1.2442 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.410 -r1.411 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.1281 -r1.1282 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.252 -r1.253 src/lib/libc/sys/Makefile.inc cvs rdiff -u -r1.181 -r1.182 src/sys/sys/Makefile cvs rdiff -u -r1.74 -r1.75 src/tests/kernel/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/dev/audio
Module Name:src Committed By: rin Date: Thu Aug 3 08:36:38 UTC 2023 Modified Files: src/tests/dev/audio: audiotest.c Log Message: audiotest: Appease GCC 12.3.0 -Wmisleading-indentation It does not matter whether this statement is a part of this if-then block or not, anyway. No binary changes. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/tests/dev/audio/audiotest.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/dev/audio
Module Name:src Committed By: rin Date: Thu Aug 3 08:36:38 UTC 2023 Modified Files: src/tests/dev/audio: audiotest.c Log Message: audiotest: Appease GCC 12.3.0 -Wmisleading-indentation It does not matter whether this statement is a part of this if-then block or not, anyway. No binary changes. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/tests/dev/audio/audiotest.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/dev/audio/audiotest.c diff -u src/tests/dev/audio/audiotest.c:1.30 src/tests/dev/audio/audiotest.c:1.31 --- src/tests/dev/audio/audiotest.c:1.30 Sat Jun 24 05:27:13 2023 +++ src/tests/dev/audio/audiotest.c Thu Aug 3 08:36:38 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: audiotest.c,v 1.30 2023/06/24 05:27:13 msaitoh Exp $ */ +/* $NetBSD: audiotest.c,v 1.31 2023/08/03 08:36:38 rin Exp $ */ /* * Copyright (C) 2019 Tetsuya Isaki. All rights reserved. @@ -26,7 +26,7 @@ */ #include -__RCSID("$NetBSD: audiotest.c,v 1.30 2023/06/24 05:27:13 msaitoh Exp $"); +__RCSID("$NetBSD: audiotest.c,v 1.31 2023/08/03 08:36:38 rin Exp $"); #include #include @@ -1065,7 +1065,7 @@ void *debug_mmap(int line, void *ptr, si #define ADDFLAG(buf, var, name) do {\ if (((var) & (name))) \ n = strlcat(buf, "|" #name, sizeof(buf)); \ - var &= ~(name); \ + (var) &= ~(name); \ } while (0) n = 0;
CVS commit: src/sys/dev/podulebus
Module Name:src Committed By: mrg Date: Thu Aug 3 08:35:14 UTC 2023 Modified Files: src/sys/dev/podulebus: if_ea.c Log Message: check if string is nul char, not if array is NULL. avoids always-true condition. found by GCC 12. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/dev/podulebus/if_ea.c 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/podulebus/if_ea.c diff -u src/sys/dev/podulebus/if_ea.c:1.17 src/sys/dev/podulebus/if_ea.c:1.18 --- src/sys/dev/podulebus/if_ea.c:1.17 Wed Oct 10 22:17:44 2012 +++ src/sys/dev/podulebus/if_ea.c Thu Aug 3 08:35:14 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ea.c,v 1.17 2012/10/10 22:17:44 skrll Exp $ */ +/* $NetBSD: if_ea.c,v 1.18 2023/08/03 08:35:14 mrg Exp $ */ /* * Copyright (c) 2000, 2001 Ben Harris @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ea.c,v 1.17 2012/10/10 22:17:44 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ea.c,v 1.18 2023/08/03 08:35:14 mrg Exp $"); #include @@ -119,7 +119,7 @@ eaattach(device_t parent, device_t self, >sc_8005.sc_ioh); /* Get the Ethernet address from the device description string. */ - if (pa->pa_descr == NULL) { + if (pa->pa_descr[0] == '\0') { printf(": No description for Ethernet address\n"); return; }
CVS commit: src/sys/dev/podulebus
Module Name:src Committed By: mrg Date: Thu Aug 3 08:35:14 UTC 2023 Modified Files: src/sys/dev/podulebus: if_ea.c Log Message: check if string is nul char, not if array is NULL. avoids always-true condition. found by GCC 12. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/dev/podulebus/if_ea.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/compat/ultrix
Module Name:src Committed By: mrg Date: Thu Aug 3 08:32:52 UTC 2023 Modified Files: src/sys/compat/ultrix: ultrix_misc.c Log Message: avoid uninitialised accesses found by GCC 12. To generate a diff of this commit: cvs rdiff -u -r1.126 -r1.127 src/sys/compat/ultrix/ultrix_misc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/ultrix/ultrix_misc.c diff -u src/sys/compat/ultrix/ultrix_misc.c:1.126 src/sys/compat/ultrix/ultrix_misc.c:1.127 --- src/sys/compat/ultrix/ultrix_misc.c:1.126 Tue Sep 7 11:43:05 2021 +++ src/sys/compat/ultrix/ultrix_misc.c Thu Aug 3 08:32:52 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: ultrix_misc.c,v 1.126 2021/09/07 11:43:05 riastradh Exp $ */ +/* $NetBSD: ultrix_misc.c,v 1.127 2023/08/03 08:32:52 mrg Exp $ */ /* * Copyright (c) 1995, 1997 Jonathan Stone (hereinafter referred to as the author) @@ -76,7 +76,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ultrix_misc.c,v 1.126 2021/09/07 11:43:05 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ultrix_misc.c,v 1.127 2023/08/03 08:32:52 mrg Exp $"); #if defined(_KERNEL_OPT) #include "opt_sysv.h" @@ -648,7 +648,7 @@ ultrix_sys_shmsys(struct lwp *l, const s /* Ultrix SVSHM weirndess: */ struct sys_shmat_args shmat_args; struct compat_14_sys_shmctl_args shmctl_args; - struct sys_shmdt_args shmdt_args; + struct sys_shmdt_args shmdt_args = {0}; struct sys_shmget_args shmget_args;
CVS commit: src/sys/compat/ultrix
Module Name:src Committed By: mrg Date: Thu Aug 3 08:32:52 UTC 2023 Modified Files: src/sys/compat/ultrix: ultrix_misc.c Log Message: avoid uninitialised accesses found by GCC 12. To generate a diff of this commit: cvs rdiff -u -r1.126 -r1.127 src/sys/compat/ultrix/ultrix_misc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/sgimips/mace
Module Name:src Committed By: mrg Date: Thu Aug 3 08:31:06 UTC 2023 Modified Files: src/sys/arch/sgimips/mace: mace.c Log Message: check a pointer's value not the address of a pointer. found by GCC 12. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/sgimips/mace/mace.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sgimips/mace/mace.c diff -u src/sys/arch/sgimips/mace/mace.c:1.25 src/sys/arch/sgimips/mace/mace.c:1.26 --- src/sys/arch/sgimips/mace/mace.c:1.25 Sat Aug 7 16:19:04 2021 +++ src/sys/arch/sgimips/mace/mace.c Thu Aug 3 08:31:06 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: mace.c,v 1.25 2021/08/07 16:19:04 thorpej Exp $ */ +/* $NetBSD: mace.c,v 1.26 2023/08/03 08:31:06 mrg Exp $ */ /* * Copyright (c) 2003 Christopher Sekiya @@ -45,7 +45,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mace.c,v 1.25 2021/08/07 16:19:04 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mace.c,v 1.26 2023/08/03 08:31:06 mrg Exp $"); #include #include @@ -302,7 +302,7 @@ mace_intr_disestablish(void *cookie) /* do not do an unmask when irq is shared. */ for (i = 0; i < MACE_NINTR; i++) - if ([i].func != NULL && maceintrtab[i].irq == irq) + if (maceintrtab[i].func != NULL && maceintrtab[i].irq == irq) break; if (i == MACE_NINTR) crime_intr_unmask(intr);
CVS commit: src/sys/arch/sgimips/mace
Module Name:src Committed By: mrg Date: Thu Aug 3 08:31:06 UTC 2023 Modified Files: src/sys/arch/sgimips/mace: mace.c Log Message: check a pointer's value not the address of a pointer. found by GCC 12. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/sgimips/mace/mace.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch
Module Name:src Committed By: mrg Date: Thu Aug 3 08:16:31 UTC 2023 Modified Files: src/sys/arch/evbarm/gumstix: gumstix_machdep.c src/sys/arch/evbarm/ixm1200: ixm1200_machdep.c src/sys/arch/hpcarm/hpcarm: pxa2x0_hpc_machdep.c sa11x0_hpc_machdep.c src/sys/arch/hppa/stand: Makefile.buildboot src/sys/arch/m68k/m68k: regdump.c src/sys/arch/macppc/macppc: cpu.c Log Message: ignore "-Warray-bounds" for various low level platform code that knows how something is setup but technically is undefined behaviour. the most common here is "extern int end;" and then using offsets of "" that are outside the bounds of this 4-byte integer. these uses are almost certainly all OK in reality. found by GCC 12. To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/sys/arch/evbarm/gumstix/gumstix_machdep.c cvs rdiff -u -r1.67 -r1.68 src/sys/arch/evbarm/ixm1200/ixm1200_machdep.c cvs rdiff -u -r1.31 -r1.32 src/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c cvs rdiff -u -r1.22 -r1.23 src/sys/arch/hpcarm/hpcarm/sa11x0_hpc_machdep.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hppa/stand/Makefile.buildboot cvs rdiff -u -r1.14 -r1.15 src/sys/arch/m68k/m68k/regdump.c cvs rdiff -u -r1.72 -r1.73 src/sys/arch/macppc/macppc/cpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/gumstix/gumstix_machdep.c diff -u src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.73 src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.74 --- src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.73 Thu Apr 20 08:28:04 2023 +++ src/sys/arch/evbarm/gumstix/gumstix_machdep.c Thu Aug 3 08:16:30 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: gumstix_machdep.c,v 1.73 2023/04/20 08:28:04 skrll Exp $ */ +/* $NetBSD: gumstix_machdep.c,v 1.74 2023/08/03 08:16:30 mrg Exp $ */ /* * Copyright (C) 2005, 2006, 2007 WIDE Project and SOUM Corporation. * All rights reserved. @@ -467,6 +467,13 @@ read_system_serial(void) char system_serial[GUMSTIX_SYSTEM_SERIAL_SIZE], *src; char x; +/* + * XXXGCC12. + * This accesses beyond what "char *src" is known to supply. + */ +#pragma GCC push_options +#pragma GCC diagnostic ignored "-Warray-bounds" + src = (char *)(FLASH_OFFSET_USER_PROTECTION * 2 /*word*/); *(volatile uint16_t *)0 = FLASH_CMD_READ_ID; memcpy(system_serial, @@ -487,6 +494,7 @@ read_system_serial(void) * gumstix_serial_hash(system_serial); */ } +#pragma GCC pop_options system_serial_high = system_serial[0] << 24 | system_serial[1] << 16 | system_serial[2] << 8 | system_serial[3]; system_serial_low = system_serial[4] << 24 | system_serial[5] << 16 | Index: src/sys/arch/evbarm/ixm1200/ixm1200_machdep.c diff -u src/sys/arch/evbarm/ixm1200/ixm1200_machdep.c:1.67 src/sys/arch/evbarm/ixm1200/ixm1200_machdep.c:1.68 --- src/sys/arch/evbarm/ixm1200/ixm1200_machdep.c:1.67 Thu Apr 20 08:28:05 2023 +++ src/sys/arch/evbarm/ixm1200/ixm1200_machdep.c Thu Aug 3 08:16:31 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: ixm1200_machdep.c,v 1.67 2023/04/20 08:28:05 skrll Exp $ */ +/* $NetBSD: ixm1200_machdep.c,v 1.68 2023/08/03 08:16:31 mrg Exp $ */ /* * Copyright (c) 2002, 2003 @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ixm1200_machdep.c,v 1.67 2023/04/20 08:28:05 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ixm1200_machdep.c,v 1.68 2023/08/03 08:16:31 mrg Exp $"); #include "opt_arm_debug.h" #include "opt_console.h" @@ -344,7 +344,14 @@ initarm(void *arg) #if NKSYMS || defined(DDB) || defined(MODULAR) if (! memcmp(, "\177ELF", 4)) { +/* + * XXXGCC12. + * This accesses beyond what "int end" technically supplies. + */ +#pragma GCC push_options +#pragma GCC diagnostic ignored "-Warray-bounds" sh = (Elf_Shdr *)((char *) + ((Elf_Ehdr *))->e_shoff); +#pragma GCC pop_options loop = ((Elf_Ehdr *))->e_shnum; for(; loop; loop--, sh++) if (sh->sh_offset > 0 && Index: src/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c diff -u src/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c:1.31 src/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c:1.32 --- src/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c:1.31 Thu Apr 20 08:28:06 2023 +++ src/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c Thu Aug 3 08:16:31 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: pxa2x0_hpc_machdep.c,v 1.31 2023/04/20 08:28:06 skrll Exp $ */ +/* $NetBSD: pxa2x0_hpc_machdep.c,v 1.32 2023/08/03 08:16:31 mrg Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pxa2x0_hpc_machdep.c,v 1.31 2023/04/20 08:28:06 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pxa2x0_hpc_machdep.c,v 1.32 2023/08/03 08:16:31 mrg Exp $"); #include "opt_ddb.h" #include "opt_dram_pages.h" @@ -267,8 +267,15 @@ init_pxa2x0(int argc, char **argv, struc symbolsize = 0; #if NKSYMS || defined(DDB) || defined(MODULAR) if (!memcmp(,
CVS commit: src/sys/arch
Module Name:src Committed By: mrg Date: Thu Aug 3 08:16:31 UTC 2023 Modified Files: src/sys/arch/evbarm/gumstix: gumstix_machdep.c src/sys/arch/evbarm/ixm1200: ixm1200_machdep.c src/sys/arch/hpcarm/hpcarm: pxa2x0_hpc_machdep.c sa11x0_hpc_machdep.c src/sys/arch/hppa/stand: Makefile.buildboot src/sys/arch/m68k/m68k: regdump.c src/sys/arch/macppc/macppc: cpu.c Log Message: ignore "-Warray-bounds" for various low level platform code that knows how something is setup but technically is undefined behaviour. the most common here is "extern int end;" and then using offsets of "" that are outside the bounds of this 4-byte integer. these uses are almost certainly all OK in reality. found by GCC 12. To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/sys/arch/evbarm/gumstix/gumstix_machdep.c cvs rdiff -u -r1.67 -r1.68 src/sys/arch/evbarm/ixm1200/ixm1200_machdep.c cvs rdiff -u -r1.31 -r1.32 src/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c cvs rdiff -u -r1.22 -r1.23 src/sys/arch/hpcarm/hpcarm/sa11x0_hpc_machdep.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hppa/stand/Makefile.buildboot cvs rdiff -u -r1.14 -r1.15 src/sys/arch/m68k/m68k/regdump.c cvs rdiff -u -r1.72 -r1.73 src/sys/arch/macppc/macppc/cpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: mrg Date: Thu Aug 3 08:10:40 UTC 2023 Modified Files: src/sys/arch/arm/sunxi: sunxi_ccu_display.c Log Message: avoid potentially uninitialised variable that likely won't happen. GCC 12 can't tell that hardware / platform design means it won't happen. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/sunxi/sunxi_ccu_display.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/sunxi/sunxi_ccu_display.c diff -u src/sys/arch/arm/sunxi/sunxi_ccu_display.c:1.2 src/sys/arch/arm/sunxi/sunxi_ccu_display.c:1.3 --- src/sys/arch/arm/sunxi/sunxi_ccu_display.c:1.2 Mon Apr 2 20:55:49 2018 +++ src/sys/arch/arm/sunxi/sunxi_ccu_display.c Thu Aug 3 08:10:40 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_ccu_display.c,v 1.2 2018/04/02 20:55:49 bouyer Exp $ */ +/* $NetBSD: sunxi_ccu_display.c,v 1.3 2023/08/03 08:10:40 mrg Exp $ */ /*- * Copyright (c) 2018 Manuel Bouyer @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_ccu_display.c,v 1.2 2018/04/02 20:55:49 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_ccu_display.c,v 1.3 2023/08/03 08:10:40 mrg Exp $"); #include #include @@ -102,7 +102,7 @@ sunxi_ccu_lcdxch1_set_rate(struct sunxi_ { struct clk *clkp, *pllclkp; int best_diff; - int parent_rate, best_parent_rate; + int parent_rate, best_parent_rate = 0; uint32_t best_m, best_d; int error;
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: mrg Date: Thu Aug 3 08:10:40 UTC 2023 Modified Files: src/sys/arch/arm/sunxi: sunxi_ccu_display.c Log Message: avoid potentially uninitialised variable that likely won't happen. GCC 12 can't tell that hardware / platform design means it won't happen. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/sunxi/sunxi_ccu_display.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sbin/fsck_udf
Module Name:src Committed By: mrg Date: Thu Aug 3 08:06:11 UTC 2023 Modified Files: src/sbin/fsck_udf: main.c Log Message: avoid double-free. found by GCC 12. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sbin/fsck_udf/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/sbin/fsck_udf/main.c diff -u src/sbin/fsck_udf/main.c:1.13 src/sbin/fsck_udf/main.c:1.14 --- src/sbin/fsck_udf/main.c:1.13 Mon Apr 25 15:37:14 2022 +++ src/sbin/fsck_udf/main.c Thu Aug 3 08:06:11 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.13 2022/04/25 15:37:14 reinoud Exp $ */ +/* $NetBSD: main.c,v 1.14 2023/08/03 08:06:11 mrg Exp $ */ /* * Copyright (c) 2022 Reinoud Zandijk @@ -37,7 +37,7 @@ #include #ifndef lint -__RCSID("$NetBSD: main.c,v 1.13 2022/04/25 15:37:14 reinoud Exp $"); +__RCSID("$NetBSD: main.c,v 1.14 2023/08/03 08:06:11 mrg Exp $"); #endif /* not lint */ #include @@ -2800,6 +2800,7 @@ udf_check_VDS_areas(void) { context.vds_buf = vds1_buf; context.vds_size = vds1_size; free(vds2_buf); + vds2_buf = NULL; } if (!error2) { /* retrieve data from VDS 2 */ @@ -2807,6 +2808,7 @@ udf_check_VDS_areas(void) { context.vds_buf = vds2_buf; context.vds_size = vds2_size; free(vds1_buf); + vds1_buf = NULL; } /* check if all is correct and complete */ error = udf_process_vds();
CVS commit: src/sbin/fsck_udf
Module Name:src Committed By: mrg Date: Thu Aug 3 08:06:11 UTC 2023 Modified Files: src/sbin/fsck_udf: main.c Log Message: avoid double-free. found by GCC 12. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sbin/fsck_udf/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/cddl/osnet/dist/uts/common/dtrace
Module Name:src Committed By: mrg Date: Thu Aug 3 08:04:07 UTC 2023 Modified Files: src/external/cddl/osnet/dist/uts/common/dtrace: dtrace.c Log Message: fix uninitialised variable usage. found by GCC 12. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 \ src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.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/dtrace/dtrace.c diff -u src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c:1.41 src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c:1.42 --- src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c:1.41 Tue Nov 17 03:20:33 2020 +++ src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c Thu Aug 3 08:04:07 2023 @@ -7577,7 +7577,7 @@ dtrace_probe(dtrace_id_t id, uintptr_t a } now = mstate.dtms_timestamp = dtrace_gethrtime(); - mstate.dtms_present |= DTRACE_MSTATE_TIMESTAMP; + mstate.dtms_present = DTRACE_MSTATE_TIMESTAMP; vtime = dtrace_vtime_references != 0; if (vtime && curthread->t_dtrace_start)
CVS commit: src/external/cddl/osnet/dist/uts/common/dtrace
Module Name:src Committed By: mrg Date: Thu Aug 3 08:04:07 UTC 2023 Modified Files: src/external/cddl/osnet/dist/uts/common/dtrace: dtrace.c Log Message: fix uninitialised variable usage. found by GCC 12. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 \ src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/dev
Module Name:src Committed By: martin Date: Thu Aug 3 08:05:16 UTC 2023 Modified Files: src/sys/dev [netbsd-8]: spkr.c Log Message: Apply addition patch to fix the build, requested by riastradh in ticket #1868: sys/dev/spkr.c (apply patch) Pacify -Wsign-compare. To generate a diff of this commit: cvs rdiff -u -r1.7.2.1 -r1.7.2.2 src/sys/dev/spkr.c 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/spkr.c diff -u src/sys/dev/spkr.c:1.7.2.1 src/sys/dev/spkr.c:1.7.2.2 --- src/sys/dev/spkr.c:1.7.2.1 Tue Aug 1 13:05:57 2023 +++ src/sys/dev/spkr.c Thu Aug 3 08:05:16 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: spkr.c,v 1.7.2.1 2023/08/01 13:05:57 martin Exp $ */ +/* $NetBSD: spkr.c,v 1.7.2.2 2023/08/03 08:05:16 martin Exp $ */ /* * Copyright (c) 1990 Eric S. Raymond (e...@snark.thyrsus.com) @@ -43,7 +43,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: spkr.c,v 1.7.2.1 2023/08/01 13:05:57 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: spkr.c,v 1.7.2.2 2023/08/03 08:05:16 martin Exp $"); #include #include @@ -164,7 +164,7 @@ playtone(struct spkr_softc *sc, int pitc * snum / (val * sdenom)); return; } - KASSERTMSG(pitch < __arraycount(pitchtab), "pitch=%d", pitch); + KASSERTMSG((size_t)pitch < __arraycount(pitchtab), "pitch=%d", pitch); int fac = sc->sc_whole * (FILLTIME - sc->sc_fill); int fval = FILLTIME * val; @@ -300,7 +300,7 @@ playstring(struct spkr_softc *sc, const case 'N': GETNUM(cp, pitch); KASSERTMSG(pitch >= 0, "pitch=%d", pitch); - if (pitch >= __arraycount(pitchtab)) + if ((size_t)pitch >= __arraycount(pitchtab)) break; for (sustain = 0; slen > 0 && cp[1] == '.'; cp++) { slen--;
CVS commit: [netbsd-8] src/sys/dev
Module Name:src Committed By: martin Date: Thu Aug 3 08:05:16 UTC 2023 Modified Files: src/sys/dev [netbsd-8]: spkr.c Log Message: Apply addition patch to fix the build, requested by riastradh in ticket #1868: sys/dev/spkr.c (apply patch) Pacify -Wsign-compare. To generate a diff of this commit: cvs rdiff -u -r1.7.2.1 -r1.7.2.2 src/sys/dev/spkr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: mrg Date: Thu Aug 3 08:03:19 UTC 2023 Modified Files: src/external/bsd/libevent/dist: event.c src/usr.bin/rdist: expand.c src/usr.sbin/powerd: powerd.c Log Message: avoid having addresses of local variable exist after a function returns. found by GCC 12. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/bsd/libevent/dist/event.c cvs rdiff -u -r1.18 -r1.19 src/usr.bin/rdist/expand.c cvs rdiff -u -r1.20 -r1.21 src/usr.sbin/powerd/powerd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: mrg Date: Thu Aug 3 08:03:19 UTC 2023 Modified Files: src/external/bsd/libevent/dist: event.c src/usr.bin/rdist: expand.c src/usr.sbin/powerd: powerd.c Log Message: avoid having addresses of local variable exist after a function returns. found by GCC 12. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/bsd/libevent/dist/event.c cvs rdiff -u -r1.18 -r1.19 src/usr.bin/rdist/expand.c cvs rdiff -u -r1.20 -r1.21 src/usr.sbin/powerd/powerd.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/libevent/dist/event.c diff -u src/external/bsd/libevent/dist/event.c:1.5 src/external/bsd/libevent/dist/event.c:1.6 --- src/external/bsd/libevent/dist/event.c:1.5 Wed Apr 7 03:36:48 2021 +++ src/external/bsd/libevent/dist/event.c Thu Aug 3 08:03:19 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: event.c,v 1.5 2021/04/07 03:36:48 christos Exp $ */ +/* $NetBSD: event.c,v 1.6 2023/08/03 08:03:19 mrg Exp $ */ /* * Copyright (c) 2000-2007 Niels Provos @@ -28,7 +28,7 @@ */ #include "event2/event-config.h" #include -__RCSID("$NetBSD: event.c,v 1.5 2021/04/07 03:36:48 christos Exp $"); +__RCSID("$NetBSD: event.c,v 1.6 2023/08/03 08:03:19 mrg Exp $"); #include "evconfig-private.h" #ifdef _WIN32 @@ -1382,6 +1382,7 @@ event_signal_closure(struct event_base * return; } } + ev->ev_pncalls = NULL; } /* Common timeouts are special timeouts that are handled as queues rather than Index: src/usr.bin/rdist/expand.c diff -u src/usr.bin/rdist/expand.c:1.18 src/usr.bin/rdist/expand.c:1.19 --- src/usr.bin/rdist/expand.c:1.18 Tue Jul 14 21:05:34 2009 +++ src/usr.bin/rdist/expand.c Thu Aug 3 08:03:19 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: expand.c,v 1.18 2009/07/14 21:05:34 apb Exp $ */ +/* $NetBSD: expand.c,v 1.19 2023/08/03 08:03:19 mrg Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)expand.c 8.1 (Berkeley) 6/9/93"; #else -__RCSID("$NetBSD: expand.c,v 1.18 2009/07/14 21:05:34 apb Exp $"); +__RCSID("$NetBSD: expand.c,v 1.19 2023/08/03 08:03:19 mrg Exp $"); #endif #endif /* not lint */ @@ -141,6 +141,10 @@ expand(struct namelist *list, int wh) printf("expanded list = "); prnames(list); } + sortbase = NULL; + eargv = NULL; + path = tpathp = pathp = NULL; + lastpathp = NULL; return(list); } Index: src/usr.sbin/powerd/powerd.c diff -u src/usr.sbin/powerd/powerd.c:1.20 src/usr.sbin/powerd/powerd.c:1.21 --- src/usr.sbin/powerd/powerd.c:1.20 Mon Oct 12 16:54:43 2020 +++ src/usr.sbin/powerd/powerd.c Thu Aug 3 08:03:19 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: powerd.c,v 1.20 2020/10/12 16:54:43 roy Exp $ */ +/* $NetBSD: powerd.c,v 1.21 2023/08/03 08:03:19 mrg Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -189,6 +189,7 @@ run_script(const char *argv[]) if (access(path, R_OK|X_OK) == 0) { int status; pid_t pid; + const char *orig_argv0 = argv[0]; argv[0] = path; @@ -199,13 +200,16 @@ run_script(const char *argv[]) (void)fprintf(stderr, " %s", argv[j]); (void)fprintf(stderr, "\n"); } - if (no_scripts != 0) + if (no_scripts != 0) { +argv[0] = orig_argv0; return; + } switch ((pid = vfork())) { case -1: powerd_log(LOG_ERR, "fork to run script: %s", strerror(errno)); +argv[0] = orig_argv0; return; case 0: @@ -233,6 +237,7 @@ run_script(const char *argv[]) } break; } + argv[0] = orig_argv0; return; }
CVS commit: src/external/bsd/iscsi/dist/src/lib
Module Name:src Committed By: mrg Date: Thu Aug 3 08:00:10 UTC 2023 Modified Files: src/external/bsd/iscsi/dist/src/lib: util.c Log Message: log a pointer's value before calling free() on it. avoids technical UB. found by GCC 12. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/iscsi/dist/src/lib/util.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/crypto/external/bsd/openssh/dist
Module Name:src Committed By: mrg Date: Thu Aug 3 07:59:33 UTC 2023 Modified Files: src/crypto/external/bsd/openssh/dist: sshkey-xmss.c Log Message: avoid potential uninitialised variable use. found by GCC 12. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/crypto/external/bsd/openssh/dist/sshkey-xmss.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/iscsi/dist/src/lib
Module Name:src Committed By: mrg Date: Thu Aug 3 08:00:10 UTC 2023 Modified Files: src/external/bsd/iscsi/dist/src/lib: util.c Log Message: log a pointer's value before calling free() on it. avoids technical UB. found by GCC 12. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/iscsi/dist/src/lib/util.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/util.c diff -u src/external/bsd/iscsi/dist/src/lib/util.c:1.4 src/external/bsd/iscsi/dist/src/lib/util.c:1.5 --- src/external/bsd/iscsi/dist/src/lib/util.c:1.4 Thu Oct 24 19:13:25 2013 +++ src/external/bsd/iscsi/dist/src/lib/util.c Thu Aug 3 08:00:10 2023 @@ -134,15 +134,15 @@ iscsi_malloc(unsigned n) void iscsi_free_atomic(void *ptr) { - (void) free(ptr); iscsi_trace(TRACE_MEM, "iscsi_free_atomic(%p)\n", ptr); + (void) free(ptr); } void iscsi_free(void *ptr) { - (void) free(ptr); iscsi_trace(TRACE_MEM, "iscsi_free(%p)\n", ptr); + (void) free(ptr); } /* debugging levels */
CVS commit: src/crypto/external/bsd/openssh/dist
Module Name:src Committed By: mrg Date: Thu Aug 3 07:59:33 UTC 2023 Modified Files: src/crypto/external/bsd/openssh/dist: sshkey-xmss.c Log Message: avoid potential uninitialised variable use. found by GCC 12. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/crypto/external/bsd/openssh/dist/sshkey-xmss.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssh/dist/sshkey-xmss.c diff -u src/crypto/external/bsd/openssh/dist/sshkey-xmss.c:1.9 src/crypto/external/bsd/openssh/dist/sshkey-xmss.c:1.10 --- src/crypto/external/bsd/openssh/dist/sshkey-xmss.c:1.9 Wed Jul 26 17:58:16 2023 +++ src/crypto/external/bsd/openssh/dist/sshkey-xmss.c Thu Aug 3 07:59:32 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: sshkey-xmss.c,v 1.9 2023/07/26 17:58:16 christos Exp $ */ +/* $NetBSD: sshkey-xmss.c,v 1.10 2023/08/03 07:59:32 mrg Exp $ */ /* $OpenBSD: sshkey-xmss.c,v 1.12 2022/10/28 00:39:29 djm Exp $ */ /* * Copyright (c) 2017 Markus Friedl. All rights reserved. @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "includes.h" -__RCSID("$NetBSD: sshkey-xmss.c,v 1.9 2023/07/26 17:58:16 christos Exp $"); +__RCSID("$NetBSD: sshkey-xmss.c,v 1.10 2023/08/03 07:59:32 mrg Exp $"); #include #include @@ -445,7 +445,7 @@ sshkey_xmss_get_state(const struct sshke u_int32_t idx = 0; char *filename = NULL; char *statefile = NULL, *ostatefile = NULL, *lockfile = NULL; - int lockfd = -1, have_state = 0, have_ostate, tries = 0; + int lockfd = -1, have_state = 0, have_ostate = 0, tries = 0; int ret = SSH_ERR_INVALID_ARGUMENT, r; if (state == NULL)
CVS commit: src/usr.sbin/makemandb
Module Name:src Committed By: rin Date: Thu Aug 3 07:49:23 UTC 2023 Modified Files: src/usr.sbin/makemandb: apropos-utils.c apropos.c custom_apropos_tokenizer.c fts3_tokenizer.h whatis.c Log Message: makemandb: trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/usr.sbin/makemandb/apropos-utils.c cvs rdiff -u -r1.26 -r1.27 src/usr.sbin/makemandb/apropos.c cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/makemandb/custom_apropos_tokenizer.c cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/makemandb/fts3_tokenizer.h cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/makemandb/whatis.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/makemandb
Module Name:src Committed By: rin Date: Thu Aug 3 07:49:23 UTC 2023 Modified Files: src/usr.sbin/makemandb: apropos-utils.c apropos.c custom_apropos_tokenizer.c fts3_tokenizer.h whatis.c Log Message: makemandb: trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/usr.sbin/makemandb/apropos-utils.c cvs rdiff -u -r1.26 -r1.27 src/usr.sbin/makemandb/apropos.c cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/makemandb/custom_apropos_tokenizer.c cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/makemandb/fts3_tokenizer.h cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/makemandb/whatis.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/makemandb/apropos-utils.c diff -u src/usr.sbin/makemandb/apropos-utils.c:1.50 src/usr.sbin/makemandb/apropos-utils.c:1.51 --- src/usr.sbin/makemandb/apropos-utils.c:1.50 Sun Sep 11 20:32:37 2022 +++ src/usr.sbin/makemandb/apropos-utils.c Thu Aug 3 07:49:23 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: apropos-utils.c,v 1.50 2022/09/11 20:32:37 gutteridge Exp $ */ +/* $NetBSD: apropos-utils.c,v 1.51 2023/08/03 07:49:23 rin Exp $ */ /*- * Copyright (c) 2011 Abhinav Upadhyay * All rights reserved. @@ -31,7 +31,7 @@ */ #include -__RCSID("$NetBSD: apropos-utils.c,v 1.50 2022/09/11 20:32:37 gutteridge Exp $"); +__RCSID("$NetBSD: apropos-utils.c,v 1.51 2023/08/03 07:49:23 rin Exp $"); #include #include @@ -202,11 +202,11 @@ create_db(sqlite3 *db) "CREATE VIRTUAL TABLE mandb USING fts4(section, name, " "name_desc, desc, lib, return_vals, env, files, " "exit_status, diagnostics, errors, md5_hash UNIQUE, machine, " -#ifndef APROPOS_DEBUG +#ifndef APROPOS_DEBUG "compress=zip, uncompress=unzip, tokenize=custom_apropos_tokenizer, " #else "tokenize=porter, " -#endif +#endif "notindexed=section, notindexed=md5_hash); " //mandb_meta "CREATE TABLE IF NOT EXISTS mandb_meta(device, inode, mtime, " Index: src/usr.sbin/makemandb/apropos.c diff -u src/usr.sbin/makemandb/apropos.c:1.26 src/usr.sbin/makemandb/apropos.c:1.27 --- src/usr.sbin/makemandb/apropos.c:1.26 Thu May 19 04:08:03 2022 +++ src/usr.sbin/makemandb/apropos.c Thu Aug 3 07:49:23 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: apropos.c,v 1.26 2022/05/19 04:08:03 gutteridge Exp $ */ +/* $NetBSD: apropos.c,v 1.27 2023/08/03 07:49:23 rin Exp $ */ /*- * Copyright (c) 2011 Abhinav Upadhyay * All rights reserved. @@ -31,7 +31,7 @@ */ #include -__RCSID("$NetBSD: apropos.c,v 1.26 2022/05/19 04:08:03 gutteridge Exp $"); +__RCSID("$NetBSD: apropos.c,v 1.27 2023/08/03 07:49:23 rin Exp $"); #include #include @@ -275,7 +275,7 @@ main(int argc, char *argv[]) if (pc == -1) err(EXIT_FAILURE, "pclose error"); - /* + /* * Something wrong with the database, writing output, or a non-existent * pager. */ Index: src/usr.sbin/makemandb/custom_apropos_tokenizer.c diff -u src/usr.sbin/makemandb/custom_apropos_tokenizer.c:1.4 src/usr.sbin/makemandb/custom_apropos_tokenizer.c:1.5 --- src/usr.sbin/makemandb/custom_apropos_tokenizer.c:1.4 Sun Dec 5 08:03:32 2021 +++ src/usr.sbin/makemandb/custom_apropos_tokenizer.c Thu Aug 3 07:49:23 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: custom_apropos_tokenizer.c,v 1.4 2021/12/05 08:03:32 wiz Exp $ */ +/* $NetBSD: custom_apropos_tokenizer.c,v 1.5 2023/08/03 07:49:23 rin Exp $ */ /* ** 2006 September 30 ** @@ -72,7 +72,7 @@ aproposPorterCreate(int argc, const char /* * Destroy a tokenizer */ -static int +static int aproposPorterDestroy(sqlite3_tokenizer * pTokenizer) { free(pTokenizer); @@ -82,10 +82,10 @@ aproposPorterDestroy(sqlite3_tokenizer * /* * Prepare to begin tokenizing a particular string. The input * string to be tokenized is zInput[0..nInput-1]. A cursor - * used to incrementally tokenize this string is returned in + * used to incrementally tokenize this string is returned in * *ppCursor. */ -static int +static int aproposPorterOpen( sqlite3_tokenizer * pTokenizer, /* The tokenizer */ const char *zInput, int nInput, /* String to be tokenized */ @@ -114,7 +114,7 @@ aproposPorterOpen( * Close a tokenization cursor previously opened by a call to * aproposPorterOpen() above. */ -static int +static int aproposPorterClose(sqlite3_tokenizer_cursor *pCursor) { custom_apropos_tokenizer_cursor *c = (custom_apropos_tokenizer_cursor *) pCursor; @@ -134,7 +134,7 @@ static const char cType[] = { /* * isConsonant() and isVowel() determine if their first character in * the string they point to is a consonant or a vowel, according - * to Porter ruls. + * to Porter ruls. * * A consonate is any letter other than 'a', 'e', 'i', 'o', or 'u'. * 'Y' is a consonant unless it follows another consonant, @@ -146,7 +146,7 @@ static const char cType[] = { */ static int isVowel(const char*); -static int +static int isConsonant(const char *z) { int j; @@ -160,7 +160,7 @@