[CONC-370] Address sanitizer detects memory leak in ma_open() Created: 2018-09-04  Updated: 2018-11-13  Resolved: 2018-11-13

Status: Closed
Project: MariaDB Connector/C
Component/s: None
Affects Version/s: None
Fix Version/s: 3.0.7

Type: Bug Priority: Major
Reporter: FLAESCH Sebastien Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Environment:

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



 Comments   
Comment by FLAESCH Sebastien [ 2018-09-04 ]

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

Comment by Georg Richter [ 2018-11-07 ]

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

Comment by FLAESCH Sebastien [ 2018-11-07 ]

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.

Comment by Georg Richter [ 2018-11-07 ]

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

Comment by FLAESCH Sebastien [ 2018-11-07 ]

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

Generated at Thu Feb 08 03:04:49 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.