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

Enable hardware CRC32 under Valgrind

    XMLWordPrintable

    Details

      Description

      Copy of https://bugs.mysql.com/bug.php?id=94121:

      [29 Jan 15:54] Laurynas Biveinis
      Description:
      Under Valgrind, hardware CRC32 checksums are disabled because:

      static bool ut_crc32_check_cpu() {
      ...
      /* Valgrind does not understand the CRC32 instructions:

      vex amd64->IR: unhandled instruction bytes: 0xF2 0x48 0xF 0x38 0xF0 0xA
      valgrind: Unrecognised instruction at address 0xad3db5.
      ...

      This comes right from original implementation in 2011. But Valgrind 3.6.1, released also in 2011, added support for the instruction. Eight years later, it should be safe to remove, might save a cycle or two, also the patch only deletes code, which is always good. Quick test with new Valgrind shows that it works.

      How to repeat:
      See above

      Suggested fix:
      Remove #ifdef UNIV_DEBUG_VALGRIND from ut_crc32_check_cpu

        Smart Checklist

          Attachments

            Activity

              People

              Assignee:
              laurynas.biveinis Laurynas Biveinis (Inactive)
              Reporter:
              laurynas.biveinis Laurynas Biveinis (Inactive)
              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, 40 minutes
                  1h 40m