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

            Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/35005
            Subject: LU-11233 tests: fix gcc8 build warnings
            Project: fs/lustre-release
            Branch: b2_12
            Current Patch Set: 1
            Commit: 72949fed0b1c17b5a1e57dc955c6ea2ae56400dc

            gerrit Gerrit Updater added a comment - Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/35005 Subject: LU-11233 tests: fix gcc8 build warnings Project: fs/lustre-release Branch: b2_12 Current Patch Set: 1 Commit: 72949fed0b1c17b5a1e57dc955c6ea2ae56400dc

            Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/35004
            Subject: LU-11233 utils: fix build warnings for gcc8
            Project: fs/lustre-release
            Branch: b2_12
            Current Patch Set: 1
            Commit: f457cdc4ec5bc51f9491890b81e78e62dba20950

            gerrit Gerrit Updater added a comment - Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/35004 Subject: LU-11233 utils: fix build warnings for gcc8 Project: fs/lustre-release Branch: b2_12 Current Patch Set: 1 Commit: f457cdc4ec5bc51f9491890b81e78e62dba20950

            Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/35003
            Subject: LU-11233 utils: fix double-free of params fields
            Project: fs/lustre-release
            Branch: b2_12
            Current Patch Set: 1
            Commit: e1432f444904fc016f173690ad0ab3683df753c6

            gerrit Gerrit Updater added a comment - Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/35003 Subject: LU-11233 utils: fix double-free of params fields Project: fs/lustre-release Branch: b2_12 Current Patch Set: 1 Commit: e1432f444904fc016f173690ad0ab3683df753c6

            Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/35002
            Subject: LU-11233 build: support for gcc8
            Project: fs/lustre-release
            Branch: b2_12
            Current Patch Set: 1
            Commit: ea462e2422153901f9b7115ca567911911768f67

            gerrit Gerrit Updater added a comment - Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/35002 Subject: LU-11233 build: support for gcc8 Project: fs/lustre-release Branch: b2_12 Current Patch Set: 1 Commit: ea462e2422153901f9b7115ca567911911768f67
            pjones Peter Jones added a comment -

            Landed for 2.13

            pjones Peter Jones added a comment - Landed for 2.13

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/34661/
            Subject: LU-11233 tests: fix gcc8 build warnings
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 6733fbff9a682bcec5fdca6f7062c24f0fe27cfe

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/34661/ Subject: LU-11233 tests: fix gcc8 build warnings Project: fs/lustre-release Branch: master Current Patch Set: Commit: 6733fbff9a682bcec5fdca6f7062c24f0fe27cfe

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/34662/
            Subject: LU-11233 utils: fix build warnings for gcc8
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 5e0ad2afa62e9eb7cf4f48c394c6a84c74a02f2f

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/34662/ Subject: LU-11233 utils: fix build warnings for gcc8 Project: fs/lustre-release Branch: master Current Patch Set: Commit: 5e0ad2afa62e9eb7cf4f48c394c6a84c74a02f2f
            yujian Jian Yu added a comment -

            Hi Alex,
            I'm working on RHEL 8.0 Lustre client support (LU-12269). With a bunch of patches applied, the build in https://review.whamcloud.com/34908 failed as follows:

            00:35:12 liblnetconfig.c: In function 'yaml_copy_peer_nids':
            00:35:12 liblnetconfig.c:4321:3: error: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
            00:35:12    strncpy(nids[num], entry->cy_valuestring,
            00:35:12    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            00:35:12     strlen(entry->cy_valuestring));
            00:35:12     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            00:35:12 liblnetconfig.c: In function 'lnet_expr2ips':
            00:35:12 liblnetconfig.c:722:30: error: '%s' directive output may be truncated writing up to 127 bytes into a region of size 104 [-Werror=format-truncation=]
            00:35:12     "\"cannot parse ip_range '%s'\"", ip_range);
            00:35:12                               ^~      ~~~~~~~~
            00:35:12 liblnetconfig.c:720:3: note: 'snprintf' output between 27 and 154 bytes into a destination of size 128
            00:35:12    snprintf(err_str,
            00:35:12    ^~~~~~~~~~~~~~~~~
            00:35:12     LNET_MAX_STR_LEN,
            00:35:12     ~~~~~~~~~~~~~~~~~
            00:35:12     "\"cannot parse ip_range '%s'\"", ip_range);
            00:35:12     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            00:35:12 cc1: all warnings being treated as errors
            

            However, the output of configure was:

            00:21:24 checking for -Wno-format-truncation support... yes
            00:21:24 checking for -Wno-stringop-truncation support... yes
            00:21:24 checking for -Wno-stringop-overflow support... yes
            <~snip~>
            00:21:28 EXTRA_KCFLAGS: -include /var/lib/jenkins/workspace/lustre-reviews/arch/x86_64/build_type/client/distro/el8/ib_stack/inkernel/BUILD/lustre/undef.h -include /var/lib/jenkins/workspace/lustre-reviews/arch/x86_64/build_type/client/distro/el8/ib_stack/inkernel/BUILD/lustre/config.h  -g -I/var/lib/jenkins/workspace/lustre-reviews/arch/x86_64/build_type/client/distro/el8/ib_stack/inkernel/BUILD/lustre/libcfs/include -I/var/lib/jenkins/workspace/lustre-reviews/arch/x86_64/build_type/client/distro/el8/ib_stack/inkernel/BUILD/lustre/lnet/include -I/var/lib/jenkins/workspace/lustre-reviews/arch/x86_64/build_type/client/distro/el8/ib_stack/inkernel/BUILD/lustre/lustre/include -Wno-format-truncation -Wno-stringop-truncation -Wno-stringop-overflow
            

            "-Wno-format-truncation -Wno-stringop-truncation -Wno-stringop-overflow" were specified in EXTRA_KCFLAGS but they didn't work. gcc version is 8.2.1.

            Could you please advise?

            yujian Jian Yu added a comment - Hi Alex, I'm working on RHEL 8.0 Lustre client support ( LU-12269 ). With a bunch of patches applied, the build in https://review.whamcloud.com/34908 failed as follows: 00:35:12 liblnetconfig.c: In function 'yaml_copy_peer_nids': 00:35:12 liblnetconfig.c:4321:3: error: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation] 00:35:12 strncpy(nids[num], entry->cy_valuestring, 00:35:12 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 00:35:12 strlen(entry->cy_valuestring)); 00:35:12 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 00:35:12 liblnetconfig.c: In function 'lnet_expr2ips': 00:35:12 liblnetconfig.c:722:30: error: '%s' directive output may be truncated writing up to 127 bytes into a region of size 104 [-Werror=format-truncation=] 00:35:12 "\"cannot parse ip_range '%s'\"", ip_range); 00:35:12 ^~ ~~~~~~~~ 00:35:12 liblnetconfig.c:720:3: note: 'snprintf' output between 27 and 154 bytes into a destination of size 128 00:35:12 snprintf(err_str, 00:35:12 ^~~~~~~~~~~~~~~~~ 00:35:12 LNET_MAX_STR_LEN, 00:35:12 ~~~~~~~~~~~~~~~~~ 00:35:12 "\"cannot parse ip_range '%s'\"", ip_range); 00:35:12 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 00:35:12 cc1: all warnings being treated as errors However, the output of configure was: 00:21:24 checking for -Wno-format-truncation support... yes 00:21:24 checking for -Wno-stringop-truncation support... yes 00:21:24 checking for -Wno-stringop-overflow support... yes <~snip~> 00:21:28 EXTRA_KCFLAGS: -include /var/lib/jenkins/workspace/lustre-reviews/arch/x86_64/build_type/client/distro/el8/ib_stack/inkernel/BUILD/lustre/undef.h -include /var/lib/jenkins/workspace/lustre-reviews/arch/x86_64/build_type/client/distro/el8/ib_stack/inkernel/BUILD/lustre/config.h -g -I/var/lib/jenkins/workspace/lustre-reviews/arch/x86_64/build_type/client/distro/el8/ib_stack/inkernel/BUILD/lustre/libcfs/include -I/var/lib/jenkins/workspace/lustre-reviews/arch/x86_64/build_type/client/distro/el8/ib_stack/inkernel/BUILD/lustre/lnet/include -I/var/lib/jenkins/workspace/lustre-reviews/arch/x86_64/build_type/client/distro/el8/ib_stack/inkernel/BUILD/lustre/lustre/include -Wno-format-truncation -Wno-stringop-truncation -Wno-stringop-overflow "-Wno-format-truncation -Wno-stringop-truncation -Wno-stringop-overflow" were specified in EXTRA_KCFLAGS but they didn't work. gcc version is 8.2.1. Could you please advise?

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/34711/
            Subject: LU-11233 utils: fix double-free of params fields
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 7c7c39d84c98df3c6fe33c04c9e391529a86db53

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/34711/ Subject: LU-11233 utils: fix double-free of params fields Project: fs/lustre-release Branch: master Current Patch Set: Commit: 7c7c39d84c98df3c6fe33c04c9e391529a86db53

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/34660/
            Subject: LU-11233 build: support for gcc8
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 6601661f96325b4971d0d1cb0be0fa01cc2ddc97

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/34660/ Subject: LU-11233 build: support for gcc8 Project: fs/lustre-release Branch: master Current Patch Set: Commit: 6601661f96325b4971d0d1cb0be0fa01cc2ddc97

            Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/34711
            Subject: LU-11233 utils: fix double-free of params fields
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 01eb91f826be2531f707540e57266fc04f7d2c67

            gerrit Gerrit Updater added a comment - Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/34711 Subject: LU-11233 utils: fix double-free of params fields Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 01eb91f826be2531f707540e57266fc04f7d2c67

            People

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

              Dates

                Created:
                Updated:
                Resolved: