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

UBSAN: sql/item_sum.cc:1135:10: runtime error: null pointer passed as argument 2

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.5
    • Fix Version/s: 10.5
    • Labels:
      None
    • Environment:
       RelWithDebInfo WITH_UBSAN ppc64le g++-9 (Ubuntu 9.2.1-17ubuntu1~18.04.1) 9.2.1 20191102

      Description

      10.5-605555fc31784302a54d398d9503ca1e9e4bdec9 RelWithDebInfo WITH_UBSAN ppc64le g++-9 (Ubuntu 9.2.1-17ubuntu1~18.04.1) 9.2.1 20191102

      ~/build-mariadb-server-10.5-futex$ export UBSAN_OPTIONS=print_stacktrace=1
      ~/build-mariadb-server-10.5-futex$ mysql-test/mtr --mem encryption.tempfiles_encrypted
      Logging: /home/dan/mariadb-server-not-worktree/mysql-test/mysql-test-run.pl  --mem encryption.tempfiles_encrypted
      vardir: /home/dan/build-mariadb-server-10.5-futex/mysql-test/var
      Checking leftover processes...
      Removing old var directory...
      Creating var directory '/home/dan/build-mariadb-server-10.5-futex/mysql-test/var'...
       - symlinking 'var' to '/dev/shm/var_auto_rszH'
      Checking supported features...
      MariaDB Version 10.5.4-MariaDB
       - SSL connections supported
       - binaries built with wsrep patch
      Collecting tests...
      Installing system database...
       
      ==============================================================================
       
      TEST                                      RESULT   TIME (ms) or COMMENT
      --------------------------------------------------------------------------
       
      worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
      encryption.tempfiles_encrypted 'cbc,innodb' [ fail ]  Found warnings/errors in server log file!
              Test ended at 2020-06-19 13:02:37
      line
      /home/dan/mariadb-server-not-worktree/sql/protocol.cc:61:9: runtime error: null pointer passed as argument 2, which is declared to never be null
      /home/dan/mariadb-server-not-worktree/mysys/mf_iocache.c:772:3: runtime error: null pointer passed as argument 1, which is declared to never be null
      /home/dan/mariadb-server-not-worktree/mysys/my_alloc.c:468:5: runtime error: null pointer passed as argument 2, which is declared to never be null
      /home/dan/mariadb-server-not-worktree/sql/sql_string.h:329:11: runtime error: null pointer passed as argument 2, which is declared to never be null
      /home/dan/mariadb-server-not-worktree/sql/item_sum.cc:1135:10: runtime error: null pointer passed as argument 1, which is declared to never be null
      /home/dan/mariadb-server-not-worktree/sql/item_sum.cc:1135:10: runtime error: null pointer passed as argument 2, which is declared to never be null
      ^ Found warnings in /home/dan/build-mariadb-server-10.5-futex/mysql-test/var/log/mysqld.1.err
      ok
      

      sql/item_sum.cc:1135:10: runtime error: null pointer passed as argument 1

      {/home/dan/mariadb-server-not-worktree/sql/item_sum.cc:1135:10: runtime error: null pointer passed as argument 1, which is declared to never be null
          #0 0x1379c6b38 in Item_sum_num::fix_fields(THD*, Item**) /home/dan/mariadb-server-not-worktree/sql/item_sum.cc:1135
          #1 0x137f04f4c in Item_window_func::fix_fields(THD*, Item**) /home/dan/mariadb-server-not-worktree/sql/item_windowfunc.cc:118
          #2 0x137f04f4c in Item_window_func::fix_fields(THD*, Item**) /home/dan/mariadb-server-not-worktree/sql/item_windowfunc.cc:85
          #3 0x13623fd84 in Item::fix_fields_if_needed(THD*, Item**) /home/dan/mariadb-server-not-worktree/sql/item.h:978
          #4 0x13623fd84 in Item::fix_fields_if_needed_for_scalar(THD*, Item**) /home/dan/mariadb-server-not-worktree/sql/item.h:982
          #5 0x13623fd84 in setup_fields(THD*, Bounds_checked_array<Item*>, List<Item>&, enum_column_usage, List<Item>*, List<Item>*, bool) /home/dan/mariadb-server-not-worktree/sql/sql_base.cc:7573
          #6 0x1366d4b48 in JOIN::prepare(TABLE_LIST*, Item*, unsigned int, st_order*, bool, st_order*, Item*, st_order*, st_select_lex*, st_select_lex_unit*) /home/dan/mariadb-server-not-worktree/sql/sql_select.cc:1247
          #7 0x1368764d8 in st_select_lex_unit::prepare_join(THD*, st_select_lex*, select_result*, unsigned long long, bool) /home/dan/mariadb-server-not-worktree/sql/sql_union.cc:1093
          #8 0x1368894cc in st_select_lex_unit::prepare(TABLE_LIST*, select_result*, unsigned long long) /home/dan/mariadb-server-not-worktree/sql/sql_union.cc:1466
          #9 0x136326558 in mysql_derived_prepare /home/dan/mariadb-server-not-worktree/sql/sql_derived.cc:816
          #10 0x1363201d4 in mysql_handle_single_derived(LEX*, TABLE_LIST*, unsigned int) /home/dan/mariadb-server-not-worktree/sql/sql_derived.cc:206
          #11 0x136923a04 in TABLE_LIST::handle_derived(LEX*, unsigned int) /home/dan/mariadb-server-not-worktree/sql/table.cc:9059
          #12 0x1363d1350 in LEX::handle_list_of_derived(TABLE_LIST*, unsigned int) /home/dan/mariadb-server-not-worktree/sql/sql_lex.h:4416
          #13 0x1363d1350 in st_select_lex::handle_derived(LEX*, unsigned int) /home/dan/mariadb-server-not-worktree/sql/sql_lex.cc:4847
          #14 0x1366d4448 in JOIN::prepare(TABLE_LIST*, Item*, unsigned int, st_order*, bool, st_order*, Item*, st_order*, st_select_lex*, st_select_lex_unit*) /home/dan/mariadb-server-not-worktree/sql/sql_select.cc:1146
          #15 0x1366dd674 in mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) /home/dan/mariadb-server-not-worktree/sql/sql_select.cc:4613
          #16 0x1366dfc20 in handle_select(THD*, LEX*, select_result*, unsigned long) /home/dan/mariadb-server-not-worktree/sql/sql_select.cc:417
          #17 0x1364c6120 in execute_sqlcom_select /home/dan/mariadb-server-not-worktree/sql/sql_parse.cc:6209
          #18 0x1364f0a20 in mysql_execute_command(THD*) /home/dan/mariadb-server-not-worktree/sql/sql_parse.cc:3939
          #19 0x13649fd64 in mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /home/dan/mariadb-server-not-worktree/sql/sql_parse.cc:7993
          #20 0x1364dd7fc in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /home/dan/mariadb-server-not-worktree/sql/sql_parse.cc:1874
          #21 0x1364e6cb8 in do_command(THD*) /home/dan/mariadb-server-not-worktree/sql/sql_parse.cc:1355
          #22 0x136a1dc50 in do_handle_one_connection(CONNECT*, bool) /home/dan/mariadb-server-not-worktree/sql/sql_connect.cc:1411
          #23 0x136a1fdb8 in handle_one_connection /home/dan/mariadb-server-not-worktree/sql/sql_connect.cc:1313
          #24 0x13821d5d0 in pfs_spawn_thread /home/dan/mariadb-server-not-worktree/storage/perfschema/pfs.cc:2201
          #25 0x7fff81098858 in start_thread /build/glibc-uvws04/glibc-2.27/nptl/pthread_create.c:463
      noformat}
       
      {noformat:title=sql/item_sum.cc:1135:10: runtime error: null pointer passed as argument 2}
      /home/dan/mariadb-server-not-worktree/sql/item_sum.cc:1135:10: runtime error: null pointer passed as argument 2, which is declared to never be null
          #0 0x1379c6b5c in Item_sum_num::fix_fields(THD*, Item**) /home/dan/mariadb-server-not-worktree/sql/item_sum.cc:1135
          #1 0x137f04f4c in Item_window_func::fix_fields(THD*, Item**) /home/dan/mariadb-server-not-worktree/sql/item_windowfunc.cc:118
          #2 0x137f04f4c in Item_window_func::fix_fields(THD*, Item**) /home/dan/mariadb-server-not-worktree/sql/item_windowfunc.cc:85
          #3 0x13623fd84 in Item::fix_fields_if_needed(THD*, Item**) /home/dan/mariadb-server-not-worktree/sql/item.h:978
          #4 0x13623fd84 in Item::fix_fields_if_needed_for_scalar(THD*, Item**) /home/dan/mariadb-server-not-worktree/sql/item.h:982
          #5 0x13623fd84 in setup_fields(THD*, Bounds_checked_array<Item*>, List<Item>&, enum_column_usage, List<Item>*, List<Item>*, bool) /home/dan/mariadb-server-not-worktree/sql/sql_base.cc:7573
          #6 0x1366d4b48 in JOIN::prepare(TABLE_LIST*, Item*, unsigned int, st_order*, bool, st_order*, Item*, st_order*, st_select_lex*, st_select_lex_unit*) /home/dan/mariadb-server-not-worktree/sql/sql_select.cc:1247
          #7 0x1368764d8 in st_select_lex_unit::prepare_join(THD*, st_select_lex*, select_result*, unsigned long long, bool) /home/dan/mariadb-server-not-worktree/sql/sql_union.cc:1093
          #8 0x1368894cc in st_select_lex_unit::prepare(TABLE_LIST*, select_result*, unsigned long long) /home/dan/mariadb-server-not-worktree/sql/sql_union.cc:1466
          #9 0x136326558 in mysql_derived_prepare /home/dan/mariadb-server-not-worktree/sql/sql_derived.cc:816
          #10 0x1363201d4 in mysql_handle_single_derived(LEX*, TABLE_LIST*, unsigned int) /home/dan/mariadb-server-not-worktree/sql/sql_derived.cc:206
          #11 0x136923a04 in TABLE_LIST::handle_derived(LEX*, unsigned int) /home/dan/mariadb-server-not-worktree/sql/table.cc:9059
          #12 0x1363d1350 in LEX::handle_list_of_derived(TABLE_LIST*, unsigned int) /home/dan/mariadb-server-not-worktree/sql/sql_lex.h:4416
          #13 0x1363d1350 in st_select_lex::handle_derived(LEX*, unsigned int) /home/dan/mariadb-server-not-worktree/sql/sql_lex.cc:4847
          #14 0x1366d4448 in JOIN::prepare(TABLE_LIST*, Item*, unsigned int, st_order*, bool, st_order*, Item*, st_order*, st_select_lex*, st_select_lex_unit*) /home/dan/mariadb-server-not-worktree/sql/sql_select.cc:1146
          #15 0x1366dd674 in mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) /home/dan/mariadb-server-not-worktree/sql/sql_select.cc:4613
          #16 0x1366dfc20 in handle_select(THD*, LEX*, select_result*, unsigned long) /home/dan/mariadb-server-not-worktree/sql/sql_select.cc:417
          #17 0x1364c6120 in execute_sqlcom_select /home/dan/mariadb-server-not-worktree/sql/sql_parse.cc:6209
          #18 0x1364f0a20 in mysql_execute_command(THD*) /home/dan/mariadb-server-not-worktree/sql/sql_parse.cc:3939
          #19 0x13649fd64 in mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) /home/dan/mariadb-server-not-worktree/sql/sql_parse.cc:7993
          #20 0x1364dd7fc in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) /home/dan/mariadb-server-not-worktree/sql/sql_parse.cc:1874
          #21 0x1364e6cb8 in do_command(THD*) /home/dan/mariadb-server-not-worktree/sql/sql_parse.cc:1355
          #22 0x136a1dc50 in do_handle_one_connection(CONNECT*, bool) /home/dan/mariadb-server-not-worktree/sql/sql_connect.cc:1411
          #23 0x136a1fdb8 in handle_one_connection /home/dan/mariadb-server-not-worktree/sql/sql_connect.cc:1313
          #24 0x13821d5d0 in pfs_spawn_thread /home/dan/mariadb-server-not-worktree/storage/perfschema/pfs.cc:2201
          #25 0x7fff81098858 in start_thread /build/glibc-uvws04/glibc-2.27/nptl/pthread_create.c:463
      

        Attachments

          Activity

            People

            Assignee:
            bar Alexander Barkov
            Reporter:
            danblack Daniel Black
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: