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

Spider: UBSAN: runtime error: null pointer passed as argument 2, which is declared to never be null in spider_create_string on SELECT

    XMLWordPrintable

Details

    Description

      DROP DATABASE test;  # Assumes test db exists
      INSTALL SONAME 'ha_spider';
      SELECT spider_copy_tables ('a','','');
      

      Leads to:

      11.5.0 e4afa610539ae01164485554e2de839bea9de816 (Optimized, UBASAN)

      /test/11.5_opt_san/storage/spider/spd_table.cc:6973:9: runtime error: null pointer passed as argument 2, which is declared to never be null
          #0 0x146b257aff9c in spider_create_string(char const*, unsigned int) /test/11.5_opt_san/storage/spider/spd_table.cc:6973
          #1 0x146b259d79d4 in spider_udf_set_copy_tables_param_default(st_spider_copy_tables*) /test/11.5_opt_san/storage/spider/spd_copy_tables.cc:54
          #2 0x146b259d7e52 in spider_udf_parse_copy_tables_param(st_spider_copy_tables*, char*, int) /test/11.5_opt_san/storage/spider/spd_copy_tables.cc:229
          #3 0x146b259e2048 in spider_copy_tables_body(st_udf_init*, st_udf_args*, char*, char*) /test/11.5_opt_san/storage/spider/spd_copy_tables.cc:794
          #4 0x5618745afd61 in udf_handler::val_int(char*) /test/11.5_opt_san/sql/sql_udf.h:108
          #5 0x5618745afd61 in Item_func_udf_int::val_int() /test/11.5_opt_san/sql/item_func.cc:3792
          #6 0x561873916717 in Type_handler::Item_send_longlong(Item*, Protocol*, st_value*) const /test/11.5_opt_san/sql/sql_type.cc:7543
          #7 0x5618723083cc in Protocol::send_result_set_row(List<Item>*) /test/11.5_opt_san/sql/protocol.cc:1359
          #8 0x56187262a8ea in select_send::send_data(List<Item>&) /test/11.5_opt_san/sql/sql_class.cc:3189
          #9 0x561872e1e051 in select_result_sink::send_data_with_check(List<Item>&, st_select_lex_unit*, unsigned long long) /test/11.5_opt_san/sql/sql_class.h:6090
          #10 0x561872e1e051 in select_result_sink::send_data_with_check(List<Item>&, st_select_lex_unit*, unsigned long long) /test/11.5_opt_san/sql/sql_class.h:6080
          #11 0x561872e1e051 in JOIN::exec_inner() /test/11.5_opt_san/sql/sql_select.cc:4862
          #12 0x561872e22a83 in JOIN::exec() /test/11.5_opt_san/sql/sql_select.cc:4774
          #13 0x561872e1015d 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*) /test/11.5_opt_san/sql/sql_select.cc:5304
          #14 0x561872e13d60 in handle_select(THD*, LEX*, select_result*, unsigned long long) /test/11.5_opt_san/sql/sql_select.cc:630
          #15 0x561872981b00 in execute_sqlcom_select /test/11.5_opt_san/sql/sql_parse.cc:6093
          #16 0x5618729e7149 in mysql_execute_command(THD*, bool) /test/11.5_opt_san/sql/sql_parse.cc:3942
          #17 0x5618729f6382 in mysql_parse(THD*, char*, unsigned int, Parser_state*) /test/11.5_opt_san/sql/sql_parse.cc:7815
          #18 0x561872a01853 in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) /test/11.5_opt_san/sql/sql_parse.cc:1892
          #19 0x561872a0e428 in do_command(THD*, bool) /test/11.5_opt_san/sql/sql_parse.cc:1405
          #20 0x5618733866fc in do_handle_one_connection(CONNECT*, bool) /test/11.5_opt_san/sql/sql_connect.cc:1445
          #21 0x561873388cfc in handle_one_connection /test/11.5_opt_san/sql/sql_connect.cc:1347
          #22 0x146b4a697ad9 in start_thread nptl/pthread_create.c:444
          #23 0x146b4a72847b in clone3 ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
       
      2024-06-15 15:21:41 4 [ERROR] mariadbd: Can't find record in 'spider_tables'
      

      Attachments

        Activity

          People

            ycp Yuchen Pei
            Roel Roel Van de Paar
            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.