mysqltest memory leaks
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.5 |
Fix Released
|
Low
|
Laurynas Biveinis | |||
5.6 |
Fix Released
|
Low
|
Laurynas Biveinis | |||
5.7 |
Invalid
|
Undecided
|
Laurynas Biveinis |
Bug Description
On 5.5:
rpl.rpl_get_lock 'mix' w4 [ fail ]
Test ended at 2016-05-12 08:22:58
CURRENT_TEST: rpl.rpl_get_lock
=======
==20959==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 8199 byte(s) in 1 object(s) allocated from:
#0 0x7f6dc4bc454a in malloc (/usr/lib/
#1 0x48abb2 in my_malloc /mnt/workspace/
#2 0x439097 in my_net_init /mnt/workspace/
#3 0x434ddd in mysql_real_connect /mnt/workspace/
#4 0x422c75 in connect_
#5 0x42352e in do_connect(
#6 0x42648d in main /mnt/workspace/
#7 0x7f6dc399582f in __libc_start_main (/lib/x86_
SUMMARY: AddressSanitizer: 8199 byte(s) leaked in 1 allocation(s).
rpl.rpl_
Test ended at 2016-05-12 08:48:14
CURRENT_TEST: rpl.rpl_
=======
==8364==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 680 byte(s) in 34 object(s) allocated from:
#0 0x7f8fe2a3c54a in malloc (/usr/lib/
#1 0x48abb2 in my_malloc /mnt/workspace/
#2 0x48b270 in my_strdup /mnt/workspace/
#3 0x4220f9 in do_close_
#4 0x4264b5 in main /mnt/workspace/
#5 0x7f8fe180d82f in __libc_start_main (/lib/x86_
SUMMARY: AddressSanitizer: 680 byte(s) leaked in 34 allocation(s).
main.mysqltest w4 [ fail ]
...
=======
==12210==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 64 byte(s) in 2 object(s) allocated from:
#0 0x7f9ebc36b8ca in realloc (/usr/lib/
#1 0x48b0a8 in my_realloc /mnt/workspace/
#2 0x494d9c in dynstr_append_mem /mnt/workspace/
#3 0x40b434 in do_eval(
#4 0x40ba91 in check_command_
#5 0x41cbbb in var_set_
#6 0x41c71b in eval_expr(VAR*, char const*, char const**, bool, bool) /mnt/workspace/
#7 0x41d20a in var_set(char const*, char const*, char const*, char const*) /mnt/workspace/
#8 0x41ff25 in do_let(st_command*) /mnt/workspace/
#9 0x426b5d in main /mnt/workspace/
#10 0x7f9ebb13c82f in __libc_start_main (/lib/x86_
SUMMARY: AddressSanitizer: 64 byte(s) leaked in 2 allocation(s).
The fix would be to backport 81bf791dfe82ceb
commit 81bf791dfe82ceb
Author: Jon Olav Hauglid <email address hidden>
Date: Fri Jun 19 16:00:25 2015 +0200
Bug#21254060: ASAN: MEMORY LEAK IN MYSQLTEST
Fix 3 different memory leaks in mysqltest:
1) Call dynstr_free() also in case of error.
2) Call end_server() also when doing dirty close.
3) Free st_connection::name before assigning new name.
Also fixes a valgrind warning about
Conditional jump or move depends on uninitialised value(s)
tags: | added: asan ci upstream |
https:/ /github. com/percona/ percona- server/ pull/518, https:/ /github. com/percona/ percona- server/ pull/519, https:/ /github. com/percona/ percona- server/ pull/520