mysqltest memory leak on invalid replace_regex

Bug #1588318 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
Fix Released
Low
Laurynas Biveinis
5.6
Fix Released
Low
Laurynas Biveinis
5.7
Invalid
Undecided
Unassigned

Bug Description

With LeakSanitizer-enabled AddressSanitizer build,

main.mysqltest w2 [ fail ]
        Test ended at 2016-05-23 07:10:28

CURRENT_TEST: main.mysqltest
sh: 1: illegal_command: not found
mysqltest: At line 2050: command "echo "--replace_regex a" | $MYSQL_TEST 2>&1" failed with wrong error: 23

which caused by

mysqltest: At line 1: Error parsing replace_regex "a"

=================================================================
==23684==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 3072 byte(s) in 1 object(s) allocated from:
    #0 0x7fdf8de5a54a in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x9854a)
    #1 0x48fc49 in my_malloc /home/laurynas/mysql-server/mysys/my_malloc.c:38
    #2 0x49146d in init_dynamic_array2 /home/laurynas/mysql-server/mysys/array.c:70
    #3 0x413b35 in init_replace_regex(char*) /home/laurynas/mysql-server/client/mysqltest.cc:9388
    #4 0x414c57 in do_get_replace_regex(st_command*) /home/laurynas/mysql-server/client/mysqltest.cc:9539
    #5 0x426117 in main /home/laurynas/mysql-server/client/mysqltest.cc:8837
    #6 0x7fdf8d0d582f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

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

Tags: asan ci upstream
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-3453

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.