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

Valgrind: compilation fails with: writing to ‘struct buf_buddy_free_t’ with no trivial copy-assignment

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Pending Release
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: 8.0, 5.7.23-23
    • Fix Version/s: 8.0.NEXT, 5.7.24-26
    • Component/s: None
    • Labels:

      Description

      Compilation on Ubuntu 18.04 with valgrind 3.13.0 and gcc-8.2.0 fails with:

      In file included from /mysql-8.0/storage/innobase/include/ut0counter.h:42,
                       from /mysql-8.0/storage/innobase/include/sync0sync.h:45,
                       from /mysql-8.0/storage/innobase/include/sync0types.h:39,
                       from /mysql-8.0/storage/innobase/include/univ.i:590,
                       from /mysql-8.0/storage/innobase/include/os0event.h:37,
                       from /mysql-8.0/storage/innobase/include/buf0types.h:36,
                       from /mysql-8.0/storage/innobase/include/buf0buddy.h:41,
                       from /mysql-8.0/storage/innobase/buf/buf0buddy.cc:33:
      /mysql-8.0/storage/innobase/buf/buf0buddy.cc: In function ‘buf_buddy_free_t* buf_buddy_alloc_zip(buf_pool_t*, ulint)’:
      /mysql-8.0/storage/innobase/include/univ.i:631:30: error: ‘void* memset(void*, int, size_t)’ writing to an object of type ‘struct buf_buddy_free_t’ with no trivial copy-assignment [-Werror=class-memaccess]
           ut_d(memset(addr, c, size));      \
                                    ^
      /mysql-8.0/storage/innobase/include/ut0dbg.h:62:20: note: in definition of macro ‘ut_d’
       #define ut_d(EXPR) EXPR
                          ^~~~
      /mysql-8.0/storage/innobase/buf/buf0buddy.cc:327:5: note: in expansion of macro ‘UNIV_MEM_TRASH’
           UNIV_MEM_TRASH(buf, ~i, BUF_BUDDY_STAMP_OFFSET);
           ^~~~~~~~~~~~~~
      In file included from /mysql-8.0/storage/innobase/include/buf0buddy.ic:39,
                       from /mysql-8.0/storage/innobase/include/buf0buddy.h:76,
                       from /mysql-8.0/storage/innobase/buf/buf0buddy.cc:33:
      /mysql-8.0/storage/innobase/include/buf0buf.h:1609:8: note: ‘struct buf_buddy_free_t’ declared here
       struct buf_buddy_free_t {
              ^~~~~~~~~~~~~~~~         
      

        Attachments

          Activity

            People

            • Assignee:
              przemyslaw.skibinski Przemyslaw Skibinski
              Reporter:
              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 - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours
                4h