Uploaded image for project: 'MariaDB Connector/C'
  1. MariaDB Connector/C
  2. CONC-370

Address sanitizer detects memory leak in ma_open()

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 3.0.7
    • None
    • None
    • Linux Debian 9 / gcc 6.3.0

    Description

      When using the address sanitizer:

      =================================================================
      ==17486==ERROR: LeakSanitizer: detected memory leaks
       
      Direct leak of 16 byte(s) in 1 object(s) allocated from:
          #0 0x7f5e3a178d28 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc1d28)
          #1 0x7f5e2d652977 in ma_open /home/buildbot/buildbot/build/libmariadb/libmariadb/ma_io.c:108
          #2 0x7f5e2d63a6b4 in _mariadb_read_options_from_file /home/buildbot/buildbot/build/libmariadb/libmariadb/ma_default.c:164
          #3 0x7f5e2d63afc9 in _mariadb_read_options /home/buildbot/buildbot/build/libmariadb/libmariadb/ma_default.c:309
          #4 0x7f5e2d64083d in mthd_my_real_connect /home/buildbot/buildbot/build/libmariadb/libmariadb/mariadb_lib.c:1213
          #5 0x7f5e2d63da39 in mysql_real_connect /home/buildbot/buildbot/build/libmariadb/libmariadb/mariadb_lib.c:1180
          #6 0x7f5e2dc7f148 in doConnect /home/sf/genero/devel/fgl/fgl/src/sqldriver/mysql/mys.c:514
      

      Attachments

        Activity

          Sorry this is related to the client lib, I cannot move this ticket to the correct project.

          sebflaesch FLAESCH Sebastien added a comment - Sorry this is related to the client lib, I cannot move this ticket to the correct project.
          georg Georg Richter added a comment -

          Hi,
          which version of C/C do you use?

          georg Georg Richter added a comment - Hi, which version of C/C do you use?

          Hi Georg, as indicated in the "Environment" field: gcc 6.3.0:

          $ gcc --version
          gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
          Copyright (C) 2016 Free Software Foundation, Inc.
          This is free software; see the source for copying conditions.  There is NO
          warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
          

          sebflaesch FLAESCH Sebastien added a comment - Hi Georg, as indicated in the "Environment" field: gcc 6.3.0: $ gcc --version gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516 Copyright (C) 2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
          georg Georg Richter added a comment -

          I didn't ask for gcc version but for version of Connector/C.

          georg Georg Richter added a comment - I didn't ask for gcc version but for version of Connector/C.

          Sorry I don't know what Connector/C version this would be: I have compiled MariaDB 10.3.3 sources.

          sebflaesch FLAESCH Sebastien added a comment - Sorry I don't know what Connector/C version this would be: I have compiled MariaDB 10.3.3 sources.

          People

            Unassigned Unassigned
            sebflaesch FLAESCH Sebastien
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.