==1446187==ERROR: AddressSanitizer: heap-use-after-free on address 0x6190002d46b8 at pc 0x14c4f0487868 bp 0x14c4f130d590 sp 0x14c4f130d580
|
READ of size 8 at 0x6190002d46b8 thread T32
|
#0 0x14c4f0487867 in ha_spider::field_exchange(Field*) /test/11.0_dbg_san/storage/spider/ha_spider.cc:9254
|
#1 0x14c4f048bf7e in ha_spider::set_searched_bitmap_from_item_list() /test/11.0_dbg_san/storage/spider/ha_spider.cc:9561
|
#2 0x14c4f04923e8 in ha_spider::set_select_column_mode() /test/11.0_dbg_san/storage/spider/ha_spider.cc:9591
|
#3 0x14c4f05421db in ha_spider::index_init(unsigned int, bool) /test/11.0_dbg_san/storage/spider/ha_spider.cc:1217
|
#4 0x5625c4269406 in handler::ha_index_init(unsigned int, bool) /test/11.0_dbg_san/sql/handler.h:3408
|
#5 0x5625c4269406 in init_read_record_idx(READ_RECORD*, THD*, TABLE*, bool, unsigned int, bool) /test/11.0_dbg_san/sql/records.cc:85
|
#6 0x5625c4cc874c in join_init_read_record(st_join_table*) /test/11.0_dbg_san/sql/sql_select.cc:24256
|
#7 0x5625c5535350 in JOIN_TAB_SCAN::open() /test/11.0_dbg_san/sql/sql_join_cache.cc:3459
|
#8 0x5625c555b8c4 in JOIN_CACHE::join_matching_records(bool) /test/11.0_dbg_san/sql/sql_join_cache.cc:2333
|
#9 0x5625c5557882 in JOIN_CACHE::join_records(bool) /test/11.0_dbg_san/sql/sql_join_cache.cc:2158
|
#10 0x5625c4bfa8e4 in sub_select_cache(JOIN*, st_join_table*, bool) /test/11.0_dbg_san/sql/sql_select.cc:23011
|
#11 0x5625c4bf8352 in sub_select(JOIN*, st_join_table*, bool) /test/11.0_dbg_san/sql/sql_select.cc:23186
|
#12 0x5625c4da6277 in do_select /test/11.0_dbg_san/sql/sql_select.cc:22782
|
#13 0x5625c4da6277 in JOIN::exec_inner() /test/11.0_dbg_san/sql/sql_select.cc:4900
|
#14 0x5625c4da7916 in JOIN::exec() /test/11.0_dbg_san/sql/sql_select.cc:4677
|
#15 0x5625c4d960c1 in mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) /test/11.0_dbg_san/sql/sql_select.cc:5158
|
#16 0x5625c4d9a51c in handle_select(THD*, LEX*, select_result*, unsigned long long) /test/11.0_dbg_san/sql/sql_select.cc:616
|
#17 0x5625c490ca01 in execute_sqlcom_select /test/11.0_dbg_san/sql/sql_parse.cc:6279
|
#18 0x5625c496def5 in mysql_execute_command(THD*, bool) /test/11.0_dbg_san/sql/sql_parse.cc:3949
|
#19 0x5625c499d973 in mysql_parse(THD*, char*, unsigned int, Parser_state*) /test/11.0_dbg_san/sql/sql_parse.cc:8014
|
#20 0x5625c49ad707 in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) /test/11.0_dbg_san/sql/sql_parse.cc:1894
|
#21 0x5625c49bb542 in do_command(THD*, bool) /test/11.0_dbg_san/sql/sql_parse.cc:1407
|
#22 0x5625c53908b5 in do_handle_one_connection(CONNECT*, bool) /test/11.0_dbg_san/sql/sql_connect.cc:1416
|
#23 0x5625c5391dd0 in handle_one_connection /test/11.0_dbg_san/sql/sql_connect.cc:1318
|
#24 0x14c4fce94b42 in start_thread nptl/pthread_create.c:442
|
#25 0x14c4fcf269ff (/lib/x86_64-linux-gnu/libc.so.6+0x1269ff)
|
|
0x6190002d46b8 is located 56 bytes inside of 1040-byte region [0x6190002d4680,0x6190002d4a90)
|
freed by thread T32 here:
|
#0 0x5625c4021fe7 in __interceptor_free (/test/UBASAN_MD120523-mariadb-11.0.2-linux-x86_64-dbg/bin/mariadbd+0x7963fe7)
|
#1 0x5625c8739a61 in my_free /test/11.0_dbg_san/mysys/my_malloc.c:213
|
#2 0x5625c8718091 in root_free /test/11.0_dbg_san/mysys/my_alloc.c:83
|
#3 0x5625c871a4e5 in free_root /test/11.0_dbg_san/mysys/my_alloc.c:513
|
#4 0x5625c4c6f8f6 in free_tmp_table(THD*, TABLE*) /test/11.0_dbg_san/sql/sql_select.cc:22532
|
#5 0x5625c50ce0df in st_select_lex_unit::cleanup() /test/11.0_dbg_san/sql/sql_union.cc:2646
|
#6 0x5625c46beef3 in mysql_derived_fill /test/11.0_dbg_san/sql/sql_derived.cc:1322
|
#7 0x5625c46bbccf in mysql_handle_single_derived(LEX*, TABLE_LIST*, unsigned int) /test/11.0_dbg_san/sql/sql_derived.cc:200
|
#8 0x5625c4bf59fa in st_join_table::preread_init() /test/11.0_dbg_san/sql/sql_select.cc:15863
|
#9 0x5625c4bf842b in sub_select(JOIN*, st_join_table*, bool) /test/11.0_dbg_san/sql/sql_select.cc:23200
|
#10 0x5625c4da6164 in do_select /test/11.0_dbg_san/sql/sql_select.cc:22780
|
#11 0x5625c4da6164 in JOIN::exec_inner() /test/11.0_dbg_san/sql/sql_select.cc:4900
|
#12 0x5625c4da7916 in JOIN::exec() /test/11.0_dbg_san/sql/sql_select.cc:4677
|
#13 0x5625c4d960c1 in mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) /test/11.0_dbg_san/sql/sql_select.cc:5158
|
#14 0x5625c4d9a51c in handle_select(THD*, LEX*, select_result*, unsigned long long) /test/11.0_dbg_san/sql/sql_select.cc:616
|
#15 0x5625c490ca01 in execute_sqlcom_select /test/11.0_dbg_san/sql/sql_parse.cc:6279
|
#16 0x5625c496def5 in mysql_execute_command(THD*, bool) /test/11.0_dbg_san/sql/sql_parse.cc:3949
|
#17 0x5625c499d973 in mysql_parse(THD*, char*, unsigned int, Parser_state*) /test/11.0_dbg_san/sql/sql_parse.cc:8014
|
#18 0x5625c49ad707 in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) /test/11.0_dbg_san/sql/sql_parse.cc:1894
|
#19 0x5625c49bb542 in do_command(THD*, bool) /test/11.0_dbg_san/sql/sql_parse.cc:1407
|
#20 0x5625c53908b5 in do_handle_one_connection(CONNECT*, bool) /test/11.0_dbg_san/sql/sql_connect.cc:1416
|
#21 0x5625c5391dd0 in handle_one_connection /test/11.0_dbg_san/sql/sql_connect.cc:1318
|
#22 0x14c4fce94b42 in start_thread nptl/pthread_create.c:442
|
|
previously allocated by thread T32 here:
|
#0 0x5625c4022337 in __interceptor_malloc (/test/UBASAN_MD120523-mariadb-11.0.2-linux-x86_64-dbg/bin/mariadbd+0x7964337)
|
#1 0x5625c8739703 in my_malloc /test/11.0_dbg_san/mysys/my_malloc.c:91
|
#2 0x5625c8717f22 in root_alloc /test/11.0_dbg_san/mysys/my_alloc.c:71
|
#3 0x5625c8719372 in alloc_root /test/11.0_dbg_san/mysys/my_alloc.c:337
|
#4 0x5625c5842fbf in Field::operator new(unsigned long, st_mem_root*) /test/11.0_dbg_san/sql/field.h:775
|
#5 0x5625c5842fbf in Type_handler_long::make_table_field_from_def(TABLE_SHARE*, st_mem_root*, st_mysql_const_lex_string const*, Record_addr const&, Bit_addr const&, Column_definition_attributes const*, unsigned int) const /test/11.0_dbg_san/sql/sql_type.cc:8139
|
#6 0x5625c583bc76 in Type_handler_int_result::make_table_field(st_mem_root*, st_mysql_const_lex_string const*, Record_addr const&, Type_all_attributes const&, TABLE_SHARE*) const /test/11.0_dbg_san/sql/sql_type.cc:3574
|
#7 0x5625c58b1602 in Type_handler::make_and_init_table_field(st_mem_root*, st_mysql_const_lex_string const*, Record_addr const&, Type_all_attributes const&, TABLE*) const /test/11.0_dbg_san/sql/sql_type.cc:3559
|
#8 0x5625c62537b5 in Item_type_holder::create_tmp_field_ex(st_mem_root*, TABLE*, Tmp_field_src*, Tmp_field_param const*) /test/11.0_dbg_san/sql/item.h:7673
|
#9 0x5625c4c531de in create_tmp_field(TABLE*, Item*, Item***, Field**, Field**, bool, bool, bool, bool) /test/11.0_dbg_san/sql/sql_select.cc:20642
|
#10 0x5625c4c5dbcd in Create_tmp_table::add_fields(THD*, TABLE*, TMP_TABLE_PARAM*, List<Item>&) /test/11.0_dbg_san/sql/sql_select.cc:21080
|
#11 0x5625c4c80dda in create_tmp_table(THD*, TMP_TABLE_PARAM*, List<Item>&, st_order*, bool, bool, unsigned long long, unsigned long long, st_mysql_const_lex_string const*, bool, bool) /test/11.0_dbg_san/sql/sql_select.cc:21739
|
#12 0x5625c509b2f6 in select_unit::create_result_table(THD*, List<Item>*, bool, unsigned long long, st_mysql_const_lex_string const*, bool, bool, bool, unsigned int) /test/11.0_dbg_san/sql/sql_union.cc:351
|
#13 0x5625c50db3cc in st_select_lex_unit::prepare(TABLE_LIST*, select_result*, unsigned long long) /test/11.0_dbg_san/sql/sql_union.cc:1768
|
#14 0x5625c46ca993 in mysql_derived_prepare /test/11.0_dbg_san/sql/sql_derived.cc:840
|
#15 0x5625c46bbccf in mysql_handle_single_derived(LEX*, TABLE_LIST*, unsigned int) /test/11.0_dbg_san/sql/sql_derived.cc:200
|
#16 0x5625c51fa985 in TABLE_LIST::handle_derived(LEX*, unsigned int) /test/11.0_dbg_san/sql/table.cc:9620
|
#17 0x5625c47c3f67 in LEX::handle_list_of_derived(TABLE_LIST*, unsigned int) /test/11.0_dbg_san/sql/sql_lex.h:4510
|
#18 0x5625c47c3f67 in st_select_lex::handle_derived(LEX*, unsigned int) /test/11.0_dbg_san/sql/sql_lex.cc:4976
|
#19 0x5625c4ce98a1 in JOIN::prepare(TABLE_LIST*, Item*, unsigned int, st_order*, bool, st_order*, Item*, st_order*, st_select_lex*, st_select_lex_unit*) /test/11.0_dbg_san/sql/sql_select.cc:1398
|
#20 0x5625c4d98cfc in mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) /test/11.0_dbg_san/sql/sql_select.cc:5133
|
#21 0x5625c4d9a51c in handle_select(THD*, LEX*, select_result*, unsigned long long) /test/11.0_dbg_san/sql/sql_select.cc:616
|
#22 0x5625c490ca01 in execute_sqlcom_select /test/11.0_dbg_san/sql/sql_parse.cc:6279
|
#23 0x5625c496def5 in mysql_execute_command(THD*, bool) /test/11.0_dbg_san/sql/sql_parse.cc:3949
|
#24 0x5625c499d973 in mysql_parse(THD*, char*, unsigned int, Parser_state*) /test/11.0_dbg_san/sql/sql_parse.cc:8014
|
#25 0x5625c49ad707 in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) /test/11.0_dbg_san/sql/sql_parse.cc:1894
|
#26 0x5625c49bb542 in do_command(THD*, bool) /test/11.0_dbg_san/sql/sql_parse.cc:1407
|
#27 0x5625c53908b5 in do_handle_one_connection(CONNECT*, bool) /test/11.0_dbg_san/sql/sql_connect.cc:1416
|
#28 0x5625c5391dd0 in handle_one_connection /test/11.0_dbg_san/sql/sql_connect.cc:1318
|
#29 0x14c4fce94b42 in start_thread nptl/pthread_create.c:442
|
|
Thread T32 created by T0 here:
|
#0 0x5625c3fc6175 in pthread_create (/test/UBASAN_MD120523-mariadb-11.0.2-linux-x86_64-dbg/bin/mariadbd+0x7908175)
|
#1 0x5625c407c98b in create_thread_to_handle_connection(CONNECT*) /test/11.0_dbg_san/sql/mysqld.cc:6129
|
#2 0x5625c4089e67 in create_new_thread(CONNECT*) /test/11.0_dbg_san/sql/mysqld.cc:6191
|
#3 0x5625c408a6e7 in handle_accepted_socket(st_mysql_socket, st_mysql_socket) /test/11.0_dbg_san/sql/mysqld.cc:6253
|
#4 0x5625c408b738 in handle_connections_sockets() /test/11.0_dbg_san/sql/mysqld.cc:6377
|
#5 0x5625c4092ee7 in mysqld_main(int, char**) /test/11.0_dbg_san/sql/mysqld.cc:6024
|
#6 0x5625c4067eca in main /test/11.0_dbg_san/sql/main.cc:34
|
#7 0x14c4fce29d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
|
|
SUMMARY: AddressSanitizer: heap-use-after-free /test/11.0_dbg_san/storage/spider/ha_spider.cc:9254 in ha_spider::field_exchange(Field*)
|
Shadow bytes around the buggy address:
|
0x0c3280052880: 00 00 00 00 00 00 00 f7 00 f7 00 f7 f7 f7 f7 f7
|
0x0c3280052890: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7
|
0x0c32800528a0: f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7 f7
|
0x0c32800528b0: f7 f7 fa fa fa fa fa fa fa fa fa fa fa fa fa fa
|
0x0c32800528c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
|
=>0x0c32800528d0: fd fd fd fd fd fd fd[fd]fd fd fd fd fd fd fd fd
|
0x0c32800528e0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
|
0x0c32800528f0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
|
0x0c3280052900: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
|
0x0c3280052910: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
|
0x0c3280052920: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
|
Shadow byte legend (one shadow byte represents 8 application bytes):
|
Addressable: 00
|
Partially addressable: 01 02 03 04 05 06 07
|
Heap left redzone: fa
|
Freed heap region: fd
|
Stack left redzone: f1
|
Stack mid redzone: f2
|
Stack right redzone: f3
|
Stack after return: f5
|
Stack use after scope: f8
|
Global redzone: f9
|
Global init order: f6
|
Poisoned by user: f7
|
Container overflow: fc
|
Array cookie: ac
|
Intra object redzone: bb
|
ASan internal: fe
|
Left alloca redzone: ca
|
Right alloca redzone: cb
|
Shadow gap: cc
|
==1446187==ABORTING
|
230520 14:47:00 [ERROR] mysqld got signal 6 ;
|