The MySQL 5.6.48 and MySQL 5.7.30 fix
Bug #29717909 MEMORY LIFETIME OF VARIABLES BETWEEN CHECK AND UPDATE INCORRECTLY MANAGED
includes a test case for a problem that affects MariaDB Server.
Several MYSQL_SYSVAR_STR parameters that are assigning a pointer to a stack-allocated buffer in the validate callback function. This pointer would go stale after the function returns, causing the variables to read as garbage later. The bug is caught by Valgrind, but for some reason I did not get any diagnostics from AddressSanitizer.
No MYSQL_SYSVAR_STR that are declared in MariaDB Server 5.5 for InnoDB or XtraDB are affected by this.
The affected variables in MySQL 5.6 include the following:
- innodb_ft_aux_table (modified but not completely fixed in MariaDB by
- innodb_ft_user_stopword_table (not covered by their test case)