[MDEV-20262] ASAN memcpy-param-overlap in fill_alter_inplace_info Created: 2019-08-06  Updated: 2019-09-23  Resolved: 2019-09-23

Status: Closed
Project: MariaDB Server
Component/s: Data Definition - Alter Table
Affects Version/s: 10.4
Fix Version/s: 10.4.9

Type: Bug Priority: Major
Reporter: Alice Sherepa Assignee: Eugene Kosov (Inactive)
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-19189 ASAN memcpy-param-overlap in fill_alt... Closed

 Description   

create table t5 (pk int not null primary key, a char(20), unique key (pk), key (a(10)));
alter table t5  drop primary key ;

10.4 13f36fffeaecf316435

 
==19031==ERROR: AddressSanitizer: memcpy-param-overlap: memory ranges [0x62b00007fc18,0x62b00007fc28) and [0x62b00007fc20, 0x62b00007fc30) overlap
    #0 0x7f561679d662 in __asan_memcpy (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x8c662)
    #1 0xbcc01f in fill_alter_inplace_info /10.4/sql/sql_table.cc:7080
    #2 0xbdd073 in mysql_alter_table(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, HA_CREATE_INFO*, TABLE_LIST*, Alter_info*, unsigned int, st_order*, bool) /10.4/sql/sql_table.cc:9931
    #3 0xd343c6 in Sql_cmd_alter_table::execute(THD*) /10.4/sql/sql_alter.cc:508
    #4 0x9b9d78 in mysql_execute_command(THD*) /10.4/sql/sql_parse.cc:6098
    #5 0x9c451f in mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /10.4/sql/sql_parse.cc:7908
    #6 0x99e359 in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /10.4/sql/sql_parse.cc:1843
    #7 0x99b197 in do_command(THD*) /10.4/sql/sql_parse.cc:1360
    #8 0xd1edb4 in do_handle_one_connection(CONNECT*) /10.4/sql/sql_connect.cc:1404
    #9 0xd1e75a in handle_one_connection /10.4/sql/sql_connect.cc:1306
    #10 0x20f3ae2 in pfs_spawn_thread /10.4/storage/perfschema/pfs.cc:1862
    #11 0x7f56151c96b9 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76b9)
    #12 0x7f561445a41c in clone (/lib/x86_64-linux-gnu/libc.so.6+0x10741c)



 Comments   
Comment by Eugene Kosov (Inactive) [ 2019-09-23 ]

Closing as duplicate for MDEV-19189 because it reveals the same problem: incorrect memcpy() usage.

Generated at Thu Feb 08 08:58:07 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.