[MDEV-33160] show_status_array() calls various functions via incompatible pointer Created: 2024-01-03  Updated: 2024-01-19  Resolved: 2024-01-04

Status: Closed
Project: MariaDB Server
Component/s: Server
Affects Version/s: 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11, 11.0, 11.1, 11.2, 11.3, 11.4
Fix Version/s: 10.4.33, 10.5.24, 10.6.17, 10.11.7, 11.0.5, 11.1.4, 11.2.3, 11.3.2

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: UBSAN

Issue Links:
Blocks
is blocked by MDEV-26272 The macro MASTER_INFO_VAR invokes und... Closed
is blocked by MDEV-33157 runtime error: call to function wsrep... Closed
Relates
relates to MDEV-25454 Make MariaDB server UBSAN safe Confirmed

 Description   

A search git grep 'SHOW_VAR.*char' reveals many functions that do not match the signature of mysql_show_var_func but are registered as function callbacks.

These should be fixed, to avoid errors like this:

10.4 832e96deb6f368591dcb35a4fa33b2fd770aa17a

/mariadb/10.4/sql/sql_show.cc:3843:7: runtime error: call to function show_memory_used(THD*, st_mysql_show_var*, char*, system_status_var*, enum_var_type) through pointer to incorrect function type 'int (*)(THD *, st_mysql_show_var *, void *, system_status_var *, enum_var_type)'
/mariadb/10.4/sql/mysqld.cc:7612: note: show_memory_used(THD*, st_mysql_show_var*, char*, system_status_var*, enum_var_type) defined here

Some of these functions are defined with a mismatching number of parameters as well.



 Comments   
Comment by Michael Widenius [ 2024-01-03 ]

Ok to push

Generated at Thu Feb 08 10:36:50 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.