Bug #40095 index_merge_innodb valgrind Conditional jump or move depends on uninitialized
Submitted: 17 Oct 2008 0:16 Modified: 31 Oct 2008 13:27
Reporter: Mark Callaghan Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S3 (Non-critical)
Version:5.0.67, 5.0, 5.1, 6.0 bzr OS:Any
Assigned to: Sergei Glukhov CPU Architecture:Any
Tags: index_merge_innodb, uninitialized, valgrind

[17 Oct 2008 0:16] Mark Callaghan
Description:
index_merge_innodb has had this valgrind warning for me since 5.0.37. It is still there on 5.0.67. There is no suppression for it. Is this a problem?

There are other warnings that precede it.

==20136== Conditional jump or move depends on uninitialised value(s)
==20136==    at 0x81262B9: Item_func_isnull::val_int() /export/hda3/mysql-5.0.67/sql/item_cmpfunc.cc:4118
==20136==    by 0x80F78A2: Item::val_bool() /export/hda3/mysql-5.0.67/sql/item.cc:175
==20136==    by 0x81283B8: Item_cond_and::val_int() /export/hda3/mysql-5.0.67/sql/item_cmpfunc.cc:4037
==20136==    by 0x81D25B0: evaluate_join_record(JOIN*, st_join_table*, int, char*) /export/hda3/mysql-5.0.67/sql/sql_select.cc:10708
==20136==    by 0x81D8E7C: sub_select(JOIN*, st_join_table*, bool) /export/hda3/mysql-5.0.67/sql/sql_select.cc:10662
==20136==    by 0x81ED2EF: do_select(JOIN*, List<Item>*, st_table*, Procedure*) /export/hda3/mysql-5.0.67/sql/sql_select.cc:10425
==20136==    by 0x81F2AC1: JOIN::exec() /export/hda3/mysql-5.0.67/sql/sql_select.cc:2106
==20136==    by 0x81F337E: mysql_select(THD*, Item***, TABLE_LIST*, unsigned, List<Item>&, Item*, unsigned, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) /export/hda3/mysql-5.0.67/sql/sql_select.cc:2285
==20136==    by 0x81F38C1: handle_select(THD*, st_lex*, select_result*, unsigned long) /export/hda3/mysql-5.0.67/sql/sql_select.cc:257
==20136==    by 0x8197891: mysql_execute_command(THD*) /export/hda3/mysql-5.0.67/sql/sql_parse.cc:2761
==20136==    by 0x819E766: mysql_parse(THD*, char const*, unsigned, char const**) /export/hda3/mysql-5.0.67/sql/sql_parse.cc:6233
==20136==    by 0x819F3F1: dispatch_command(enum_server_command, THD*, char*, unsigned) /export/hda3/mysql-5.0.67/sql/sql_parse.cc:1898
==20136==    by 0x81A1269: handle_one_connection /export/hda3/mysql-5.0.67/sql/sql_parse.cc:1595
==20136==    by 0x4BE0CAB: pthread_start_thread /tmp/glibc.iZwOIW/glibc-2.3.6-0ubuntu20/build-tree/glibc-2.3.6/linuxthreads/manager.c:310
==20136==    by 0x4E4A129: clone /tmp/glibc.iZwOIW/glibc-2.3.6-0ubuntu20/build-tree/glibc-2.3.6/misc/../sysdeps/unix/sysv/linux/i386/clone.S:119

How to repeat:
mysql-test-run.pl --valgrind index_merge_innodb
[17 Oct 2008 6:53] Sveta Smirnova
Thank you for the report.

Verified as described.

Problem exists in version 5.1 and 6.0 too, but with different warnings. Probably separate bug should be needed for 5.1 and 6.0.
[29 Oct 2008 8:38] Sveta Smirnova
current master.err

Attachment: bug40095.master.err (application/octet-stream, text), 16.30 KiB.

[29 Oct 2008 10:32] Sergei Glukhov
checked(BUILD/compile-pentium-valgrind-max +
        mysql-test-run.pl --valgrind index_merge_innodb) 
latest 5.0,5.1,6.0 trees on fc9+valgrind-3.3.0, fc6+valgrind-3.2.1,
can't repeat.
[29 Oct 2008 10:34] Sveta Smirnova
Seems version of glibc matters: bug is repeatable on glibc 2.3
[31 Oct 2008 8:36] Sveta Smirnova
Bug is not repeatable with current development sources.
[31 Oct 2008 12:51] Mark Callaghan
I a confused. Can you reproduce this in 5.0.67 but not in the latest code available from launchpad? Can you reproduce this with older but not the latest glibc version?
[31 Oct 2008 13:27] Mark Callaghan
I reproduce this with: valgrind 3.4, gcc 4.2, glibc 2.3.6
[31 Oct 2008 20:32] Sveta Smirnova
I could reproduce it with 5.0.67 and a bit outdated development code, but can not with today pull.