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

UBSAN shift exponent X is too large for 64-bit type 'long long int' in sql/field.cc

    XMLWordPrintable

Details

    Description

      SET sql_mode='';
      CREATE TABLE t (f SET('1','2','3','4','5','6','7','8','9','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1'));
      INSERT INTO t VALUES ('0');
      

      Leads to

      11.3.0 fa64a7a10cb23475c3008ff3d935d12659d2a81f (Optimized, UBASAN)

      /test/mtest/MDEV-31606/11.3_opt_san/sql/field.cc:9459:35: runtime error: shift exponent 65 is too large for 64-bit type 'long long int'
          #0 0x558f877fd78d in Field_set::store(char const*, unsigned long, charset_info_st const*) /test/mtest/MDEV-31606/11.3_opt_san/sql/field.cc:9459
          #1 0x558f85f17f7d in fill_record(THD*, TABLE*, Field**, List<Item>&, bool, bool) /test/mtest/MDEV-31606/11.3_opt_san/sql/sql_base.cc:9320
          #2 0x558f85f196af in fill_record_n_invoke_before_triggers(THD*, TABLE*, Field**, List<Item>&, bool, trg_event_type) /test/mtest/MDEV-31606/11.3_opt_san/sql/sql_base.cc:9375
          #3 0x558f86107784 in mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool, select_result*) /test/mtest/MDEV-31606/11.3_opt_san/sql/sql_insert.cc:1097
          #4 0x558f862f9771 in mysql_execute_command(THD*, bool) /test/mtest/MDEV-31606/11.3_opt_san/sql/sql_parse.cc:4416
          #5 0x558f86285fb0 in mysql_parse(THD*, char*, unsigned int, Parser_state*) /test/mtest/MDEV-31606/11.3_opt_san/sql/sql_parse.cc:7732
          #6 0x558f862dcd28 in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) /test/mtest/MDEV-31606/11.3_opt_san/sql/sql_parse.cc:1893
          #7 0x558f862e842d in do_command(THD*, bool) /test/mtest/MDEV-31606/11.3_opt_san/sql/sql_parse.cc:1406
          #8 0x558f86c2871d in do_handle_one_connection(CONNECT*, bool) /test/mtest/MDEV-31606/11.3_opt_san/sql/sql_connect.cc:1445
          #9 0x558f86c2ad8c in handle_one_connection /test/mtest/MDEV-31606/11.3_opt_san/sql/sql_connect.cc:1347
          #10 0x14d39fc5a608 in start_thread /build/glibc-SzIz7B/glibc-2.31/nptl/pthread_create.c:477
          #11 0x14d39eecf132 in __clone (/lib/x86_64-linux-gnu/libc.so.6+0x11f132)
      

      Attachments

        Activity

          People

            bar Alexander Barkov
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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