Memory leak in mysql_client_test.c

Bug #1604364 reported by Laurynas Biveinis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.5
Invalid
Undecided
Unassigned
5.6
Fix Released
Low
Laurynas Biveinis
5.7
Invalid
Undecided
Unassigned

Bug Description

main.mysql_client_test w1 [ fail ]
        Test ended at 2016-07-18 10:19:03

CURRENT_TEST: main.mysql_client_test
mysqltest: At line 17: command "$MYSQL_CLIENT_TEST --getopt-ll-test=25600M $PLUGIN_AUTH_CLIENT_OPT >> $MYSQLTEST_VARDIR/log/mysql_client_test.out.log 2>&1" failed

==2470==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 1272 byte(s) in 1 object(s) allocated from:
    #0 0x7f9d88f27602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
    #1 0x4ed714 in my_malloc /home/laurynas/mysql-server/mysys/my_malloc.c:38
    #2 0x483cf0 in mysql_init /home/laurynas/mysql-server/sql-common/client.c:1669
    #3 0x40b314 in mysql_client_init /home/laurynas/mysql-server/tests/mysql_client_fw.c:254
    #4 0x40e3fb in test_wl6587 /home/laurynas/mysql-server/tests/mysql_client_test.c:19233
    #5 0x475372 in main /home/laurynas/mysql-server/tests/mysql_client_fw.c:1436
    #6 0x7f9d87c0a82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

SUMMARY: AddressSanitizer: 1272 byte(s) leaked in 1 allocation(s).

Tags: asan ci upstream
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

The fix is to backport

commit 3833aed1b94b18437fecd7df948234984a385770
Author: Jon Olav Hauglid <email address hidden>
Date: Tue Jun 23 11:15:17 2015 +0100

    Bug#21246842: ASAN: MEMORY LEAK IN TEST_WL6587()

    Fix memory leak in mysql_client_test - test_wl6587().
    Close the mysql connection by calling mysql_close()
    to free resources.

    Also fix a number of valgrind warnings (uninitialized data)
    in other tests.

tags: added: asan ci upstream
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-3489

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.