Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL), 11.3(EOL), 11.8
Description
Now that MDEV-26272 has been fixed and a cmake -DWITH_UBSAN=ON build with clang can pass the server bootstrap, we can find more undefined behaviour that is not flagged by GCC. Here is an example:
10.4 832e96deb6f368591dcb35a4fa33b2fd770aa17a |
/mariadb/10.4/storage/innobase/handler/ha_innodb.cc:1821:9: runtime error: call to function mysql_sys_var_long(THD*, int) through pointer to incorrect function type 'unsigned long *(*)(THD *, int)'
|
This is flagged for the function thd_lock_wait_timeout(), which simply accesses a data member that has been defined as follows:
static MYSQL_THDVAR_ULONG(lock_wait_timeout, PLUGIN_VAR_RQCMDARG, |
"Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.", |
NULL, NULL, 50, 0, 1024 * 1024 * 1024, 0);
|
// ...
|
static struct st_mysql_sys_var* innobase_system_variables[]= { |
// ...
|
MYSQL_SYSVAR(lock_wait_timeout),
|
// ...
|
NULL
|
};
|
maria_declare_plugin(innobase)
|
{
|
// ...
|
innobase_system_variables
|
// ...
|
},
|
// ...
|
maria_declare_plugin_end;
|
Attachments
Issue Links
- is blocked by
-
MDEV-26272 The macro MASTER_INFO_VAR invokes undefined behaviour
- Closed
- relates to
-
MDEV-25454 Make MariaDB server UBSAN safe
- Confirmed
-
MDEV-34512 UBSAN system variable type mismatches for ha_myisam.cc and ha_maria.cc
- Confirmed