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

gen_lex_hash leaks memory, making LeakSanitizer builds fail

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 10.0.24
    • 5.5.50, 10.0.25, 10.1.14
    • Compiling
    • 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

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

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.