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

LP:451101 - jump or move depends on uninitialised value in myxt_get_key_length

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      Valgrind catches jump or move depends on uninitialised value myxt_get_key_length in func_math test (for example)

      ==32123== Conditional jump or move depends on uninitialised value(s)
      ==32123== at 0x9BA145: myxt_get_key_length(XTIndex*, unsigned char*) (myxt_xt.cc:995)
      ==32123== by 0x9B46C7: idx_next_branch_item(XTTable*, XTIndex*, XTIdxBranch*, XTIdxResult*) (index_xt.cc:835)
      ==32123== by 0x9B67B1: xt_idx_next(XTOpenTable*, XTIndex*, XTIdxSearchKey*) (index_xt.cc:2904)
      ==32123== by 0x9A9319: ha_pbxt::index_next_same(unsigned char*, unsigned char const*, unsigned int) (ha_pbxt.cc:3130)
      ==32123== by 0x7A4F57: handler::read_range_next() (handler.cc:4246)
      ==32123== by 0x7A32BE: handler::read_multi_range_next(st_key_multi_range**) (handler.cc:4131)
      ==32123== by 0x7811D6: QUICK_RANGE_SELECT::get_next() (opt_range.cc:8424)
      ==32123== by 0x7A1084: find_all_keys(st_sort_param*, SQL_SELECT*, unsigned char*, st_io_cache, st_io_cache*, st_io_cache*) (filesort.cc:566)
      ==32123== by 0x7A1BF3: filesort(THD*, st_table*, st_sort_field*, unsigned int, SQL_SELECT*, unsigned long long, bool, unsigned long long*) (filesort.cc:244)
      ==32123== by 0x6EFC78: create_sort_index(THD*, JOIN*, st_order*, unsigned long long, unsigned long long, bool) (sql_select.cc:13838)
      ==32123== by 0x70C6AA: JOIN::exec() (sql_select.cc:2174)
      ==32123== by 0x707778: mysql_select(THD*, Item**, TABLE_LIST, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:2425)
      ==32123== by 0x70CCD1: handle_select(THD*, st_lex*, select_result*, unsigned long) (sql_select.cc:278)
      ==32123== by 0x679355: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5057)
      ==32123== by 0x67B124: mysql_execute_command(THD*) (sql_parse.cc:2242)
      ==32123== by 0x683ECE: mysql_parse(THD*, char const*, unsigned int, char const**) (sql_parse.cc:5979)
      ==32123==
      ==32123== Conditional jump or move depends on uninitialised value(s)
      ==32123== at 0x9BA145: myxt_get_key_length(XTIndex*, unsigned char*) (myxt_xt.cc:995)
      ==32123== by 0x9B46C7: idx_next_branch_item(XTTable*, XTIndex*, XTIdxBranch*, XTIdxResult*) (index_xt.cc:835)
      ==32123== by 0x9B6B98: xt_idx_next(XTOpenTable*, XTIndex*, XTIdxSearchKey*) (index_xt.cc:2976)
      ==32123== by 0x9A9319: ha_pbxt::index_next_same(unsigned char*, unsigned char const*, unsigned int) (ha_pbxt.cc:3130)
      ==32123== by 0x7A4F57: handler::read_range_next() (handler.cc:4246)
      ==32123== by 0x7A32BE: handler::read_multi_range_next(st_key_multi_range**) (handler.cc:4131)
      ==32123== by 0x7811D6: QUICK_RANGE_SELECT::get_next() (opt_range.cc:8424)
      ==32123== by 0x7A1084: find_all_keys(st_sort_param*, SQL_SELECT*, unsigned char*, st_io_cache, st_io_cache*, st_io_cache*) (filesort.cc:566)
      ==32123== by 0x7A1BF3: filesort(THD*, st_table*, st_sort_field*, unsigned int, SQL_SELECT*, unsigned long long, bool, unsigned long long*) (filesort.cc:244)
      ==32123== by 0x6EFC78: create_sort_index(THD*, JOIN*, st_order*, unsigned long long, unsigned long long, bool) (sql_select.cc:13838)
      ==32123== by 0x70C6AA: JOIN::exec() (sql_select.cc:2174)
      ==32123== by 0x707778: mysql_select(THD*, Item**, TABLE_LIST, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:2425)
      ==32123== by 0x70CCD1: handle_select(THD*, st_lex*, select_result*, unsigned long) (sql_select.cc:278)
      ==32123== by 0x679355: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5057)
      ==32123== by 0x67B124: mysql_execute_command(THD*) (sql_parse.cc:2242)
      ==32123== by 0x683ECE: mysql_parse(THD*, char const*, unsigned int, char const**) (sql_parse.cc:5979)

      For other cases see:
      http://askmonty.org/buildbot/builders/gentoo-amd64-sanja/builds/4/steps/test_1/logs/mysqld.1.err.1
      http://askmonty.org/buildbot/builders/gentoo-amd64-sanja/builds/4/steps/test_1/logs/mysqld.1.err.3
      http://askmonty.org/buildbot/builders/gentoo-amd64-sanja/builds/4/steps/test_1/logs/mysqld.1.err.4

      Can be repeated if run pbxt test suite under valgrind (valgrind build (one of BUILD/compile*valgrind* ) and --valgrind parameter of mysql-test-run)

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            monty Michael Widenius added a comment -

            [Bug 451101] [NEW] jump or move depends on uninitialised value in myxt_get_key_length

            Hi!

            >>>>> "Oleksandr" == Oleksandr Byelkin <Oleksandr> writes:

            Oleksandr> Public bug reported:
            Oleksandr> Valgrind catches jump or move depends on uninitialised value
            Oleksandr> myxt_get_key_length in func_math test (for example)

            Oleksandr> ==32123== Conditional jump or move depends on uninitialised value(s)
            Oleksandr> ==32123== at 0x9BA145: myxt_get_key_length(XTIndex*, unsigned char*) (myxt_xt.cc:995)
            Oleksandr> ==32123== by 0x9B46C7: idx_next_branch_item(XTTable*, XTIndex*, XTIdxBranch*, XTIdxResult*) (index_xt.cc:835)

            This however looks like a true bug that needs to be fixed.

            Regards,
            Monty

            Show
            monty Michael Widenius added a comment - [Bug 451101] [NEW] jump or move depends on uninitialised value in myxt_get_key_length Hi! >>>>> "Oleksandr" == Oleksandr Byelkin <Oleksandr> writes: Oleksandr> Public bug reported: Oleksandr> Valgrind catches jump or move depends on uninitialised value Oleksandr> myxt_get_key_length in func_math test (for example) Oleksandr> ==32123== Conditional jump or move depends on uninitialised value(s) Oleksandr> ==32123== at 0x9BA145: myxt_get_key_length(XTIndex*, unsigned char*) (myxt_xt.cc:995) Oleksandr> ==32123== by 0x9B46C7: idx_next_branch_item(XTTable*, XTIndex*, XTIdxBranch*, XTIdxResult*) (index_xt.cc:835) This however looks like a true bug that needs to be fixed. Regards, Monty
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 451101

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 451101

              People

              • Assignee:
                Unassigned
                Reporter:
                sanja Oleksandr Byelkin
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: