Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-9987

gen_lex_hash leaks memory, making LeakSanitizer builds fail

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.0.24
    • Fix Version/s: 5.5.50, 10.0.25, 10.1.14
    • Component/s: Compiling
    • Labels:
    • Environment:
      Ubuntu clang version 3.6.0-2ubuntu1~trusty1 w/ LeakSanitizer,
      MariaDB 10.0 branch as of ce38adddfa91949b30956abd0e4cab201effcdef

      Description

      sql/gen_lex_hash.cc leaks memory, causing builds with LeakSanitizer enabled to fail.

      =================================================================
      ==26036==ERROR: LeakSanitizer: detected memory leaks
       
      Direct leak of 13936 byte(s) in 1 object(s) allocated from:
          #0 0x4be8d5  (mariadb-server/asanbuild/sql/gen_lex_hash+0x4be8d5)
          #1 0x4e54e4  (mariadb-server/asanbuild/sql/gen_lex_hash+0x4e54e4)
       
      SUMMARY: AddressSanitizer: 13936 byte(s) leaked in 1 allocation(s).
      make[2]: *** [sql/lex_hash.h] Error 23
      

      As the memory leak itself is not a real issue, LeakSanitizer can be disabled for gen_lex_hash by including a special function in the binary:

      extern "C" int __lsan_is_turned_off() { return 1; }
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              svoj Sergey Vojtovich
              Reporter:
              davidgow David Gow
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: