diff options
author | Sujatha <sujatha.sivakumar@mariadb.com> | 2020-04-28 14:47:53 +0530 |
---|---|---|
committer | Sujatha <sujatha.sivakumar@mariadb.com> | 2020-04-29 10:52:41 +0530 |
commit | 2e6b21be4a8d0bf094da288cadff866f1bb38062 (patch) | |
tree | 78a572925eb8d69b6b04eeadf251721353a63442 /mysql-test/suite/rpl/t | |
parent | 5193c1b542532fdfe364a4c75c24b6889103be4f (diff) | |
download | mariadb-git-2e6b21be4a8d0bf094da288cadff866f1bb38062.tar.gz |
MDEV-22317: SIGSEGV in my_free/delete_dynamic in optimized builds (ARIA)
Problem:
=======
SET @@GLOBAL.replicate_wild_ignore_table='';
SET @@GLOBAL.replicate_wild_do_table='';
Reports following valgrind error.
Conditional jump or move depends on uninitialised value(s)
Rpl_filter::set_wild_ignore_table(char const*) (rpl_filter.cc:439)
Conditional jump or move depends on uninitialised value(s)
at 0xF60390: delete_dynamic (array.c:304)
by 0x74F3F2: Rpl_filter::set_wild_do_table(char const*) (rpl_filter.cc:421)
Analysis:
========
List of values provided for options "wild_do_table" and "wild_ignore_table" are
stored in DYNAMIC_ARRAYS. When an empty list is provided these dynamic arrays
are not initialized. Existing code treats empty element list as an error and
tries to clean the uninitialized list. This results in above valgrind issue.
Fix:
===
The clean up should be initiated only when there is an error while parsing the
'wild_do_table' or 'wild_ignore_table' list and the dynamic_array is in
initialized state. Otherwise for empty list it should simply return success.
Diffstat (limited to 'mysql-test/suite/rpl/t')
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_filter_wild_tables_dynamic.test | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/t/rpl_filter_wild_tables_dynamic.test b/mysql-test/suite/rpl/t/rpl_filter_wild_tables_dynamic.test index 6db61927eec..657a95cec15 100644 --- a/mysql-test/suite/rpl/t/rpl_filter_wild_tables_dynamic.test +++ b/mysql-test/suite/rpl/t/rpl_filter_wild_tables_dynamic.test @@ -13,6 +13,8 @@ SET @@GLOBAL.replicate_wild_ignore_table="test.b%"; connection slave; source include/stop_slave.inc; +SET @@GLOBAL.replicate_wild_do_table=""; +SET @@GLOBAL.replicate_wild_ignore_table=""; SET @@GLOBAL.replicate_wild_do_table="test.a%"; SET @@GLOBAL.replicate_wild_ignore_table="test.b%"; source include/start_slave.inc; |