Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-17193

RHEL 9.2 building with gcc12 hits a few issues

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.16.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      gcc12 breaks a couple of compile tests:

      /home/shaun/lustre-release/_lpb/fileattr_set_pc/fileattr_set_pc.c: In function ‘main’:
      /home/shaun/lustre-release/_lpb/fileattr_set_pc/fileattr_set_pc.c:74:32: error: array subscript 0 is outside array bounds of ‘struct inode_operations[0]’ [-Werror=array-bounds]
         74 |  ((struct inode_operations *)1)->fileattr_get(NULL, NULL);
            |                                ^~
      

      A couple of compile tests have an invalid '3rd' argument (cleanup).

      A few QCTL_COPY() macros hit:

      In function ‘strnlen’,
          inlined from ‘mdc_iocontrol’ at /home/shaun/lustre-release/lustre/mdc/mdc_request.c:2286:4:
      include/linux/fortify-string.h:23:34: error: array subscript 112 is outside array bounds of ‘void[112]’ [-Werror=array-bounds]
         23 |             __builtin_constant_p(*__p)) {                       \
            |                                  ^~~~
      include/linux/fortify-string.h:141:24: note: in expansion of macro ‘__compiletime_strlen’
        141 |         size_t p_len = __compiletime_strlen(p);
            |                        ^~~~~~~~~~~~~~~~~~~~
      In file included from include/linux/fs.h:44,
                       from include/linux/huge_mm.h:8,
                       from include/linux/mm.h:707,
                       from include/linux/pagemap.h:8,
                       from /home/shaun/lustre-release/lustre/mdc/mdc_request.c:37:
      In function ‘kmalloc’,
          inlined from ‘mdc_iocontrol’ at /home/shaun/lustre-release/lustre/mdc/mdc_request.c:2279:3:
      include/linux/slab.h:611:24: note: at offset 112 into object of size 112 allocated by ‘kmem_cache_alloc_trace’
        611 |                 return kmem_cache_alloc_trace(
            |                        ^~~~~~~~~~~~~~~~~~~~~~~
        612 |                                 kmalloc_caches[kmalloc_type(flags)][index],
            |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        613 |                                 flags, size);
            |                                 ~~~~~~~~~~~~
      cc1: all warnings being treated as errors
      

      Attachments

        Activity

          People

            stancheff Shaun Tancheff
            stancheff Shaun Tancheff
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: