Bug #90515 runtime error: call to function thd_killed through pointer to incorrect functio

Submitted: 19 Apr 2018 15:49 Modified: 23 Apr 2018 13:39
Reporter: Tor Didriksen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:8.0.13 OS:Any
Assigned to: CPU Architecture:Any

[19 Apr 2018 15:49] Tor Didriksen
Description:
mysys/thr_lock.cc:413:9: runtime error: call to function thd_killed through pointer to incorrect function type 'int (*)(const void *)'
sql/sql_thd_api.cc:506: note: thd_killed defined here
    #0 0x9b8dd55 in wait_for_lock(st_lock_list*, THR_LOCK_DATA*, THR_LOCK_INFO*, bool, unsigned long) mysys/thr_lock.cc:413:9
    #1 0x9b8d0c7 in thr_lock(THR_LOCK_DATA*, THR_LOCK_INFO*, thr_lock_type, unsigned long) mysys/thr_lock.cc:677:12
    #2 0x9b93ba3 in thr_multi_lock(THR_LOCK_DATA**, unsigned int, THR_LOCK_INFO*, unsigned long) mysys/thr_lock.cc:909:9
    #3 0x5e68088 in mysql_lock_tables(THD*, TABLE**, unsigned long, unsigned int) sql/lock.cc:346:37
    #4 0x428d28d in lock_tables(THD*, TABLE_LIST*, unsigned int, unsigned int) sql/sql_base.cc:6480:15
    #5 0x4288f78 in open_and_lock_tables(THD*, TABLE_LIST*, unsigned int, Prelocking_strategy*) sql/sql_base.cc:6316:7
    #6 0x3f040d2 in open_and_lock_tables(THD*, TABLE_LIST*, unsigned int) sql/sql_base.h:459:10
    #7 0x8acef90 in Rows_log_event::do_apply_event(Relay_log_info const*) sql/log_event.cc:9634:9
    #8 0x8a39d33 in Log_event::apply_event(Relay_log_info*) sql/log_event.cc:3757:17
    #9 0x8d94a60 in apply_event_and_update_pos(Log_event**, THD*, Relay_log_info*) sql/rpl_slave.cc:4323:20
    #10 0x8d4f134 in exec_relay_log_event(THD*, Relay_log_info*) sql/rpl_slave.cc:4782:16
    #11 0x8d0479e in handle_slave_sql sql/rpl_slave.cc:6842:9

How to repeat:
build with clang/ubsan

./mtr --mem --sanitize rpl_nogtid.rpl_circular_for_4_hosts

Suggested fix:
fix function signature of thd_killed
[23 Apr 2018 13:39] Paul DuBois
Posted by developer:
 
Fixed in 8.0.13.

A runtime error could occur for calls to thd_killed().

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.050 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.