Bug #89986 runtime error: call to function mysql_sys_var_long(THD*, int) through pointer to
Submitted: 9 Mar 2018 12:41 Modified: 23 Mar 2018 17:58
Reporter: Tor Didriksen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: CPU Architecture:Any

[9 Mar 2018 12:41] Tor Didriksen
Description:
storage/innobase/handler/ha_innodb.cc:1624:11: runtime error: call to function mysql_sys_var_long(THD*, int) through pointer to incorrect function type 'unsigned long *(*)(THD *, int)'
sql/sql_plugin.cc:2741: note: mysql_sys_var_long(THD*, int) defined here
    #0 0xa1df719 in thd_lock_wait_timeout(THD*) storage/innobase/handler/ha_innodb.cc:1624:11
    #1 0xb00bf7b in dd_sdi_acquire_exclusive_mdl(THD*, unsigned int, MDL_ticket**) storage/innobase/dict/dict0dict.cc:7242:41
    #2 0xa964186 in row_drop_table_for_mysql(char const*, trx_t*, enum_sql_command, bool, dict_table_t*) storage/innobase/row/row0mysql.cc:3805:11

How to repeat:
build with clang UBSAN
./mtr --mem --sanitize func_math

Suggested fix:
All PLUGIN_VAR_LONG variables are actually ulong, see struct System_variables,
so treat them as ulong when resolving.
[23 Mar 2018 17:58] Paul DuBois
Posted by developer:
 
Fixed in 8.0.12.

Bug affects no released version. No changelog entry needed.