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

UBSAN: downcast Item_func_plus to Item_field invalid in mysql_test_update(sql/sql_prepare.cc:1516)

    XMLWordPrintable

Details

    Description

      Executing main.view under --ps-protocol with UBSAN enabled results in:

      CURRENT_TEST: main.view
      /source/sql/sql_prepare.cc:1516:46: runtime error: downcast of address 0x7dfa1b11b5b8 which does not point to an object of type 'Item_field'
      0x7dfa1b11b5b8: note: object is of type 'Item_func_plus'
       00 00 00 00  90 87 5c 86 44 56 00 00  0c 00 00 00 00 00 00 00  e0 00 2f 87 44 56 00 00  05 00 00 00
                    ^~~~~~~~~~~~~~~~~~~~~~~
                    vptr for 'Item_func_plus'
          #0 0x56448366ae79 in mysql_test_update(Prepared_statement*, TABLE_LIST*) /source/sql/sql_prepare.cc:1516:46
          #1 0x56448365141a in check_prepared_statement(Prepared_statement*) /source/sql/sql_prepare.cc:2507:10
          #2 0x564483638cdd in Prepared_statement::prepare(char const*, unsigned int) /source/sql/sql_prepare.cc:4480:12
          #3 0x564483636eba in mysqld_stmt_prepare(THD*, char const*, unsigned int) /source/sql/sql_prepare.cc:2843:13
          #4 0x56448355d089 in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) /source/sql/sql_parse.cc:1852:5
          #5 0x56448356def5 in do_command(THD*, bool) /source/sql/sql_parse.cc:1419:17
          #6 0x564483b5da1c in do_handle_one_connection(CONNECT*, bool) /source/sql/sql_connect.cc:1386:11
          #7 0x564483b5d259 in handle_one_connection /source/sql/sql_connect.cc:1298:5
          #8 0x564484cb953c in pfs_spawn_thread /source/storage/perfschema/pfs.cc:2201:3
          #9 0x5644830106e6 in asan_thread_start(void*) asan_interceptors.cpp.o
          #10 0x7f2a1a4261f4  (/lib/x86_64-linux-gnu/libc.so.6+0x891f4) (BuildId: 79005c16293efa45b441fed45f4f29b138557e9e)
          #11 0x7f2a1a4a689b  (/lib/x86_64-linux-gnu/libc.so.6+0x10989b) (BuildId: 79005c16293efa45b441fed45f4f29b138557e9e)
      

      code changed by c27d78beb59b

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              danblack Daniel Black
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.