jump or move depends on uninitialised value in myxt_get_key_length

Bug #451101 reported by Oleksandr "Sanja" Byelkin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Fix Released
Undecided
Unassigned
PBXT
Fix Released
Undecided
Vladimir Kolesnikov

Bug 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)

Related branches

Revision history for this message
Michael Widenius (monty) wrote : [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

Changed in pbxt:
assignee: nobody → Vladimir Kolesnikov (vkolesnikov)
status: New → In Progress
Changed in pbxt:
status: In Progress → Fix Committed
Michael Widenius (monty)
Changed in pbxt:
status: Fix Committed → Fix Released
Changed in maria:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers