Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-22254

my_write / inline_mysql_file_write: Syscall param write(buf) points to uninitialised byte(s)

    XMLWordPrintable

    Details

      Description

      $ perl ./mtr main.invisible_field_grant_completely --valgrind
      

      10.3 9aacda40 Valgrind

      main.invisible_field_grant_completely    [ fail ]  Found warnings/errors in server log file!
              Test ended at 2020-04-16 01:05:51
      line
      ==22013== Thread 6:
      ==22013== Syscall param write(buf) points to uninitialised byte(s)
      ==22013==    at 0x4E481CD: ??? (syscall-template.S:84)
      ==22013==    by 0x13E6412: my_write (my_write.c:49)
      ==22013==    by 0xACFEEB: inline_mysql_file_write(char const*, unsigned int, int, unsigned char const*, unsigned long, unsigned long) (mysql_file.h:1180)
      ==22013==    by 0xAD050E: writefrm(char const*, char const*, char const*, bool, unsigned char const*, unsigned long) (discover.cc:139)
      ==22013==    by 0x90F219: TABLE_SHARE::write_frm_image(unsigned char const*, unsigned long) (table.cc:2855)
      ==22013==    by 0x908D36: TABLE_SHARE::init_from_binary_frm_image(THD*, bool, unsigned char const*, unsigned long) (table.cc:1233)
      ==22013==    by 0xB237A7: ha_create_table(THD*, char const*, char const*, char const*, HA_CREATE_INFO*, st_mysql_const_unsigned_lex_string*) (handler.cc:5155)
      ==22013==    by 0x92FC90: rea_create_table(THD*, st_mysql_const_unsigned_lex_string*, char const*, char const*, char const*, HA_CREATE_INFO*, handler*, bool) (unireg.cc:515)
      ==22013==    by 0x8CAEB1: create_table_impl(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, char const*, DDL_options_st, HA_CREATE_INFO*, Alter_info*, int, bool*, st_key**, unsigned int*, st_mysql_const_unsigned_lex_string*) (sql_table.cc:5005)
      ==22013==    by 0x8CB4D4: mysql_create_table_no_lock(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, Table_specification_st*, Alter_info*, bool*, int, TABLE_LIST*) (sql_table.cc:5127)
      ==22013==    by 0x8CB8D8: mysql_create_table(THD*, TABLE_LIST*, Table_specification_st*, Alter_info*) (sql_table.cc:5216)
      ==22013==    by 0x8DD37A: Sql_cmd_create_table_like::execute(THD*) (sql_table.cc:11250)
      ==22013==    by 0x7F6709: mysql_execute_command(THD*) (sql_parse.cc:6030)
      ==22013==    by 0x7FBE6A: mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) (sql_parse.cc:7817)
      ==22013==    by 0x7E88AD: dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) (sql_parse.cc:1856)
      ==22013==    by 0x7E71F2: do_command(THD*) (sql_parse.cc:1401)
      ==22013==  Address 0xda92f21 is 401 bytes inside a block of size 480 alloc'd
      ==22013==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
      ==22013==    by 0x13DF19A: my_malloc (my_malloc.c:101)
      ==22013==    by 0x92EFD0: build_frm_image(THD*, st_mysql_const_lex_string const*, HA_CREATE_INFO*, List<Create_field>&, unsigned int, st_key*, handler*) (unireg.cc:321)
      ==22013==    by 0x8CA399: mysql_create_frm_image(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, HA_CREATE_INFO*, Alter_info*, int, st_key**, unsigned int*, st_mysql_const_unsigned_lex_string*) (sql_table.cc:4753)
      ==22013==    by 0x8CAE2F: create_table_impl(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, char const*, DDL_options_st, HA_CREATE_INFO*, Alter_info*, int, bool*, st_key**, unsigned int*, st_mysql_const_unsigned_lex_string*) (sql_table.cc:4997)
      ==22013==    by 0x8CB4D4: mysql_create_table_no_lock(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, Table_specification_st*, Alter_info*, bool*, int, TABLE_LIST*) (sql_table.cc:5127)
      ==22013==    by 0x8CB8D8: mysql_create_table(THD*, TABLE_LIST*, Table_specification_st*, Alter_info*) (sql_table.cc:5216)
      ==22013==    by 0x8DD37A: Sql_cmd_create_table_like::execute(THD*) (sql_table.cc:11250)
      ==22013==    by 0x7F6709: mysql_execute_command(THD*) (sql_parse.cc:6030)
      ==22013==    by 0x7FBE6A: mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) (sql_parse.cc:7817)
      ==22013==    by 0x7E88AD: dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) (sql_parse.cc:1856)
      ==22013==    by 0x7E71F2: do_command(THD*) (sql_parse.cc:1401)
      ==22013==    by 0x964B11: do_handle_one_connection(CONNECT*) (sql_connect.cc:1403)
      ==22013==    by 0x964873: handle_one_connection (sql_connect.cc:1308)
      ==22013==    by 0x136C60B: pfs_spawn_thread (pfs.cc:1869)
      ==22013==    by 0x4E3F4A3: start_thread (pthread_create.c:456)
      ^ Found warnings in /data/bld/10.3-valgrind-nightly/mysql-test/var/log/mysqld.1.err
      

      Not reproducible on 10.2 or 10.4.

        Attachments

          Activity

            People

            Assignee:
            sanja Oleksandr Byelkin
            Reporter:
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: