Details

    • Improvement
    • Resolution: Fixed
    • Trivial
    • Lustre 2.13.0, Lustre 2.12.3
    • None
    • None
    • 9223372036854775807

    Description

      gcc8 introduces number of new checks (especially in string manipulation area) preventing builds

       

      Attachments

        Issue Links

          Activity

            [LU-11233] gcc8 support

            dongyang please tell what exact gcc you are using

            bzzz Alex Zhuravlev added a comment - dongyang please tell what exact gcc you are using
            dongyang Dongyang Li added a comment -

            Alex, please add something like this below to https://review.whamcloud.com/#/c/34662/ to make server utils build with gcc8:

            diff --git a/lustre/utils/mount_lustre.c b/lustre/utils/mount_lustre.c
            index 1acd6353a0..c3dcf5e62c 100644
            --- a/lustre/utils/mount_lustre.c
            +++ b/lustre/utils/mount_lustre.c
            @@ -348,7 +348,7 @@ int parse_options(struct mount_opts *mop, char *orig_options,
                                            free(options);
                                            return EINVAL;
                                    }
            -                       strncpy(mop->mo_skpath, val + 1, strlen(val + 1));
            +                       strncpy(mop->mo_skpath, val + 1, strlen(mop->mo_skpath) - 1);
             #endif
                            } else if (parse_one_option(opt, flagp) == 0) {
                                    /* pass this on as an option */
            
            dongyang Dongyang Li added a comment - Alex, please add something like this below to https://review.whamcloud.com/#/c/34662/  to make server utils build with gcc8: diff --git a/lustre/utils/mount_lustre.c b/lustre/utils/mount_lustre.c index 1acd6353a0..c3dcf5e62c 100644 --- a/lustre/utils/mount_lustre.c +++ b/lustre/utils/mount_lustre.c @@ -348,7 +348,7 @@ int parse_options(struct mount_opts *mop, char *orig_options, free(options); return EINVAL; } - strncpy(mop->mo_skpath, val + 1, strlen(val + 1)); + strncpy(mop->mo_skpath, val + 1, strlen(mop->mo_skpath) - 1); #endif } else if (parse_one_option(opt, flagp) == 0) { /* pass this on as an option */

            Alex Zhuravlev (bzzz@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/34662
            Subject: LU-11233 build: support for gcc8
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: ae3e0118240849c89ac3b222ef38ddc7184bd29a

            gerrit Gerrit Updater added a comment - Alex Zhuravlev (bzzz@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/34662 Subject: LU-11233 build: support for gcc8 Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: ae3e0118240849c89ac3b222ef38ddc7184bd29a

            Alex Zhuravlev (bzzz@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/34661
            Subject: LU-11233 build: support for gcc8
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 973f4ffb776303c8caddbc6e507d0d5c7c75f4ee

            gerrit Gerrit Updater added a comment - Alex Zhuravlev (bzzz@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/34661 Subject: LU-11233 build: support for gcc8 Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 973f4ffb776303c8caddbc6e507d0d5c7c75f4ee

            Alex Zhuravlev (bzzz@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/34660
            Subject: LU-11233 build: support for gcc8
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 76e3fc7e99538ce73708514863e63467066dced8

            gerrit Gerrit Updater added a comment - Alex Zhuravlev (bzzz@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/34660 Subject: LU-11233 build: support for gcc8 Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 76e3fc7e99538ce73708514863e63467066dced8

            Alex Zhuravlev (bzzz@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/32978
            Subject: LU-11233 build: gcc8 support
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 94f34bfcde638b7d3535154c04907544ca4b6fce

            gerrit Gerrit Updater added a comment - Alex Zhuravlev (bzzz@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/32978 Subject: LU-11233 build: gcc8 support Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 94f34bfcde638b7d3535154c04907544ca4b6fce

            People

              bzzz Alex Zhuravlev
              bzzz Alex Zhuravlev
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: