Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/cddl/osnet/dist/uts/common/fs/zfs i can't confirm o...



details:   https://anonhg.NetBSD.org/src/rev/a7fdce23ebb4
branches:  trunk
changeset: 975862:a7fdce23ebb4
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Sep 07 07:44:53 2020 +0000

description:
i can't confirm or deny that GCC 9 is wrong about parity_valid[]
having uninitialised members, but since setting up reconstruct
isn't a hot path, just zero init the whole thing to be sure.

diffstat:

 external/cddl/osnet/dist/uts/common/fs/zfs/vdev_raidz.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 23817ca0f9e7 -r a7fdce23ebb4 external/cddl/osnet/dist/uts/common/fs/zfs/vdev_raidz.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_raidz.c   Mon Sep 07 07:43:36 2020 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_raidz.c   Mon Sep 07 07:44:53 2020 +0000
@@ -1412,7 +1412,7 @@
        int i, c;
        int code;
        int nbadparity, nbaddata;
-       int parity_valid[VDEV_RAIDZ_MAXPARITY];
+       int parity_valid[VDEV_RAIDZ_MAXPARITY] = {0};
 
        /*
         * The tgts list must already be sorted.



Home | Main Index | Thread Index | Old Index