==1926638==ERROR: AddressSanitizer: heap-use-after-free on address 0x625000071358 at pc 0x555e6d806783 bp 0x1536f4d0d710 sp 0x1536f4d0d700
|
READ of size 8 at 0x625000071358 thread T19
|
#0 0x555e6d806782 in mysql_derived_prepare /test/11.0_dbg_san/sql/sql_derived.cc:947
|
#1 0x555e6d80743d in mysql_derived_merge_for_insert /test/11.0_dbg_san/sql/sql_derived.cc:532
|
#2 0x555e6d7f5ac3 in mysql_handle_derived(LEX*, unsigned int) /test/11.0_dbg_san/sql/sql_derived.cc:123
|
#3 0x555e6e22033d in Multiupdate_prelocking_strategy::handle_end(THD*) /test/11.0_dbg_san/sql/sql_update.cc:1731
|
#4 0x555e6d67a01a in open_tables(THD*, DDL_options_st const&, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*) /test/11.0_dbg_san/sql/sql_base.cc:4709
|
#5 0x555e6e2321cf in open_tables /test/11.0_dbg_san/sql/sql_base.h:266
|
#6 0x555e6e2321cf in mysql_multi_update_prepare(THD*) /test/11.0_dbg_san/sql/sql_update.cc:1888
|
#7 0x555e6daad310 in mysql_execute_command(THD*, bool) /test/11.0_dbg_san/sql/sql_parse.cc:4453
|
#8 0x555e6d478ecd in sp_instr_stmt::exec_core(THD*, unsigned int*) /test/11.0_dbg_san/sql/sp_head.cc:3857
|
#9 0x555e6d4da0d7 in sp_lex_keeper::reset_lex_and_exec_core(THD*, unsigned int*, bool, sp_instr*) /test/11.0_dbg_san/sql/sp_head.cc:3582
|
#10 0x555e6d4e00dc in sp_instr_stmt::execute(THD*, unsigned int*) /test/11.0_dbg_san/sql/sp_head.cc:3763
|
#11 0x555e6d4a6fc3 in sp_head::execute(THD*, bool) /test/11.0_dbg_san/sql/sp_head.cc:1459
|
#12 0x555e6d4b6442 in sp_head::execute_procedure(THD*, List<Item>*) /test/11.0_dbg_san/sql/sp_head.cc:2446
|
#13 0x555e6da45d4e in do_execute_sp /test/11.0_dbg_san/sql/sql_parse.cc:3026
|
#14 0x555e6da62c42 in Sql_cmd_call::execute(THD*) /test/11.0_dbg_san/sql/sql_parse.cc:3271
|
#15 0x555e6dacafac in mysql_execute_command(THD*, bool) /test/11.0_dbg_san/sql/sql_parse.cc:6001
|
#16 0x555e6dad48b1 in mysql_parse(THD*, char*, unsigned int, Parser_state*) /test/11.0_dbg_san/sql/sql_parse.cc:8000
|
#17 0x555e6dae460f in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) /test/11.0_dbg_san/sql/sql_parse.cc:1894
|
#18 0x555e6daf23d9 in do_command(THD*, bool) /test/11.0_dbg_san/sql/sql_parse.cc:1407
|
#19 0x555e6e494503 in do_handle_one_connection(CONNECT*, bool) /test/11.0_dbg_san/sql/sql_connect.cc:1416
|
#20 0x555e6e495a1e in handle_one_connection /test/11.0_dbg_san/sql/sql_connect.cc:1318
|
#21 0x153717ac4b42 in start_thread nptl/pthread_create.c:442
|
#22 0x153717b569ff (/lib/x86_64-linux-gnu/libc.so.6+0x1269ff)
|
|
0x625000071358 is located 2648 bytes inside of 8208-byte region [0x625000070900,0x625000072910)
|
freed by thread T19 here:
|
#0 0x555e6d16bfc7 in __interceptor_free (/test/UBASAN_MD130223-mariadb-11.0.1-linux-x86_64-dbg/bin/mariadbd+0x789bfc7)
|
#1 0x555e717d6b63 in my_free /test/11.0_dbg_san/mysys/my_malloc.c:213
|
#2 0x555e717b5247 in root_free /test/11.0_dbg_san/mysys/my_alloc.c:78
|
#3 0x555e717b7569 in free_root /test/11.0_dbg_san/mysys/my_alloc.c:495
|
#4 0x555e6d4a9e37 in sp_head::execute(THD*, bool) /test/11.0_dbg_san/sql/sp_head.cc:1548
|
#5 0x555e6d4b6442 in sp_head::execute_procedure(THD*, List<Item>*) /test/11.0_dbg_san/sql/sp_head.cc:2446
|
#6 0x555e6da45d4e in do_execute_sp /test/11.0_dbg_san/sql/sql_parse.cc:3026
|
#7 0x555e6da62c42 in Sql_cmd_call::execute(THD*) /test/11.0_dbg_san/sql/sql_parse.cc:3271
|
#8 0x555e6dacafac in mysql_execute_command(THD*, bool) /test/11.0_dbg_san/sql/sql_parse.cc:6001
|
#9 0x555e6dad48b1 in mysql_parse(THD*, char*, unsigned int, Parser_state*) /test/11.0_dbg_san/sql/sql_parse.cc:8000
|
#10 0x555e6dae460f in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) /test/11.0_dbg_san/sql/sql_parse.cc:1894
|
#11 0x555e6daf23d9 in do_command(THD*, bool) /test/11.0_dbg_san/sql/sql_parse.cc:1407
|
#12 0x555e6e494503 in do_handle_one_connection(CONNECT*, bool) /test/11.0_dbg_san/sql/sql_connect.cc:1416
|
#13 0x555e6e495a1e in handle_one_connection /test/11.0_dbg_san/sql/sql_connect.cc:1318
|
#14 0x153717ac4b42 in start_thread nptl/pthread_create.c:442
|
|
previously allocated by thread T19 here:
|
#0 0x555e6d16c317 in __interceptor_malloc (/test/UBASAN_MD130223-mariadb-11.0.1-linux-x86_64-dbg/bin/mariadbd+0x789c317)
|
#1 0x555e717d6805 in my_malloc /test/11.0_dbg_san/mysys/my_malloc.c:91
|
#2 0x555e717b50d8 in root_alloc /test/11.0_dbg_san/mysys/my_alloc.c:66
|
#3 0x555e717b6528 in alloc_root /test/11.0_dbg_san/mysys/my_alloc.c:332
|
#4 0x555e6da4b2d4 in Query_arena::memdup_w_gap(void const*, unsigned long, unsigned long) /test/11.0_dbg_san/sql/sql_class.h:1210
|
#5 0x555e6da4b2d4 in alloc_query(THD*, char const*, unsigned long) /test/11.0_dbg_san/sql/sql_parse.cc:2727
|
#6 0x555e6d4ddd89 in sp_instr_stmt::execute(THD*, unsigned int*) /test/11.0_dbg_san/sql/sp_head.cc:3750
|
#7 0x555e6d4a6fc3 in sp_head::execute(THD*, bool) /test/11.0_dbg_san/sql/sp_head.cc:1459
|
#8 0x555e6d4b6442 in sp_head::execute_procedure(THD*, List<Item>*) /test/11.0_dbg_san/sql/sp_head.cc:2446
|
#9 0x555e6da45d4e in do_execute_sp /test/11.0_dbg_san/sql/sql_parse.cc:3026
|
#10 0x555e6da62c42 in Sql_cmd_call::execute(THD*) /test/11.0_dbg_san/sql/sql_parse.cc:3271
|
#11 0x555e6dacafac in mysql_execute_command(THD*, bool) /test/11.0_dbg_san/sql/sql_parse.cc:6001
|
#12 0x555e6dad48b1 in mysql_parse(THD*, char*, unsigned int, Parser_state*) /test/11.0_dbg_san/sql/sql_parse.cc:8000
|
#13 0x555e6dae460f in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) /test/11.0_dbg_san/sql/sql_parse.cc:1894
|
#14 0x555e6daf23d9 in do_command(THD*, bool) /test/11.0_dbg_san/sql/sql_parse.cc:1407
|
#15 0x555e6e494503 in do_handle_one_connection(CONNECT*, bool) /test/11.0_dbg_san/sql/sql_connect.cc:1416
|
#16 0x555e6e495a1e in handle_one_connection /test/11.0_dbg_san/sql/sql_connect.cc:1318
|
#17 0x153717ac4b42 in start_thread nptl/pthread_create.c:442
|
|
Thread T19 created by T0 here:
|
#0 0x555e6d110155 in __interceptor_pthread_create (/test/UBASAN_MD130223-mariadb-11.0.1-linux-x86_64-dbg/bin/mariadbd+0x7840155)
|
#1 0x555e6d1c6068 in create_thread_to_handle_connection(CONNECT*) /test/11.0_dbg_san/sql/mysqld.cc:6100
|
#2 0x555e6d1d33a1 in create_new_thread(CONNECT*) /test/11.0_dbg_san/sql/mysqld.cc:6159
|
#3 0x555e6d1d3bfd in handle_accepted_socket(st_mysql_socket, st_mysql_socket) /test/11.0_dbg_san/sql/mysqld.cc:6221
|
#4 0x555e6d1d4c4e in handle_connections_sockets() /test/11.0_dbg_san/sql/mysqld.cc:6345
|
#5 0x555e6d1dc4df in mysqld_main(int, char**) /test/11.0_dbg_san/sql/mysqld.cc:5995
|
#6 0x555e6d1b1eaa in main /test/11.0_dbg_san/sql/main.cc:34
|
#7 0x153717a59d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
|
|
SUMMARY: AddressSanitizer: heap-use-after-free /test/11.0_dbg_san/sql/sql_derived.cc:947 in mysql_derived_prepare
|
Shadow bytes around the buggy address:
|
0x0c4a80006210: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
|
0x0c4a80006220: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
|
0x0c4a80006230: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
|
0x0c4a80006240: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
|
0x0c4a80006250: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
|
=>0x0c4a80006260: fd fd fd fd fd fd fd fd fd fd fd[fd]fd fd fd fd
|
0x0c4a80006270: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
|
0x0c4a80006280: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
|
0x0c4a80006290: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
|
0x0c4a800062a0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
|
0x0c4a800062b0: 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
|