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/f1c054dd6a44
branches:  trunk
changeset: 954638:f1c054dd6a44
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 3d64286055d5 -r f1c054dd6a44 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