Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-6052

gcc 9.2.1 reports -Werror=stringop-overflow in os_file_get_parent_dir

Details

    • Admin & Maintenance Task
    • Status: Done
    • Medium
    • Resolution: Fixed
    • 5.7.27-30, 8.0.17-8
    • 5.7.28-31, 8.0.18-9
    • None

    Description

      The newest gcc 9.2.1 from Ubuntu Bionic reports:

      In file included from /usr/include/string.h:494,
                       from /data/mysql-server/mysql-8.0/include/my_dbug.h:37,
                       from /data/mysql-server/mysql-8.0/storage/innobase/include/os0file.h:44,
                       from /data/mysql-server/mysql-8.0/storage/innobase/os/os0file.cc:41:
      In function ‘void* memcpy(void*, const void*, size_t)’,
          inlined from ‘char* mem_strdupl(const char*, ulint)’ at /data/mysql-server/mysql-8.0/storage/innobase/include/mem0mem.ic:555:11,
          inlined from ‘char* os_file_get_parent_dir(const char*)’ at /data/mysql-server/mysql-8.0/storage/innobase/os/os0file.cc:1794:22,
          inlined from ‘dberr_t os_file_create_subdirs_if_needed(const char*)’ at /data/mysql-server/mysql-8.0/storage/innobase/os/os0file.cc:1863:40:
      /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:33: error: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ specified bound 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=]
         34 |   return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
            |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      cc1plus: all warnings being treated as errors
      
      
      

      Attachments

        Activity

          People

            przemyslaw.skibinski Przemyslaw Skibinski
            przemyslaw.skibinski Przemyslaw Skibinski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 1 hour
                1h

                Smart Checklist