use of uninitialized vale in MYSQL_BIN_LOG::write()

Bug #1244100 reported by Teemu Ollakka on 2013-10-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL patches by Codership
Status tracked in 5.6
5.5
High
Teemu Ollakka
5.6
High
Teemu Ollakka
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Status tracked in 5.6
5.5
Fix Released
High
Unassigned
5.6
Fix Released
High
Unassigned

Bug Description

Valgrind complains:

==24840== Conditional jump or move depends on uninitialised value(s)
==24840== at 0x765459: MYSQL_BIN_LOG::write(Log_event*) (log.cc:5253)
==24840== by 0x581CD6: mysql_create_db(THD*, char*, st_ha_create_information*, bool) (sql_db.cc:675)
==24840== by 0x5A602F: mysql_execute_command(THD*) (sql_parse.cc:3654)
==24840== by 0x5AB82A: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:6266)
==24840== by 0x5ABA80: wsrep_mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:6099)
==24840== by 0x5AD0E8: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1214)
==24840== by 0x5AF908: do_command(THD*) (sql_parse.cc:869)
==24840== by 0x658310: do_handle_one_connection(THD*) (sql_connect.cc:887)
==24840== by 0x6584CC: handle_one_connection (sql_connect.cc:799)
==24840== by 0x5897E99: start_thread (pthread_create.c:308)
==24840== by 0x67D5CCC: clone (clone.S:112)

The reason for uninitialized value is that setting value for check_purge in MYSQL_BIN_LOG::rotate() is skipped due to

#ifdef WITH_WSREP
  if (WSREP_ON && wsrep_to_isolation)
    {
      WSREP_DEBUG("avoiding binlog rotate due to TO isolation: %d",
    wsrep_to_isolation);
      DBUG_RETURN(0);
    }
#endif

Download full text (11.5 KiB)

Related warnings seen in jenkins builds:

==========================================

# 2013-10-24T02:20:27 [4058] ==00:00:00:45.593 6590== Conditional jump or move depends on uninitialised value(s)
# 2013-10-24T02:20:27 [4058] ==00:00:00:45.593 6590== at 0x74A506: MYSQL_BIN_LOG::write(Log_event*) (log.cc:5400)
# 2013-10-24T02:20:27 [4058] ==00:00:00:45.593 6590== by 0x57D616: mysql_create_db(THD*, char*, st_ha_create_information*, bool) (sql_db.cc:660)
# 2013-10-24T02:20:27 [4058] ==00:00:00:45.593 6590== by 0x59DF92: mysql_execute_command(THD*) (sql_parse.cc:3865)
# 2013-10-24T02:20:27 [4058] ==00:00:00:45.593 6590== by 0x5A029A: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:6417)
# 2013-10-24T02:20:27 [4058] ==00:00:00:45.593 6590== by 0x5A03F1: wsrep_mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:6221)
# 2013-10-24T02:20:27 [4058] ==00:00:00:45.593 6590== by 0x5A3945: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1245)
# 2013-10-24T02:20:27 [4058] ==00:00:00:45.593 6590== by 0x5A4366: do_command(THD*) (sql_parse.cc:874)
# 2013-10-24T02:20:27 [4058] ==00:00:00:45.593 6590== by 0x64105E: do_handle_one_connection(THD*) (sql_connect.cc:1526)
# 2013-10-24T02:20:27 [4058] ==00:00:00:45.593 6590== by 0x641240: handle_one_connection (sql_connect.cc:1434)
# 2013-10-24T02:20:27 [4058] ==00:00:00:45.593 6590== by 0x381C407850: start_thread (in /lib64/libpthread-2.12.so)
# 2013-10-24T02:20:27 [4058] ==00:00:00:45.593 6590== by 0x381C0E894C: clone (in /lib64/libc-2.12.so)
# 2013-10-24T02:20:27 [4058] ==00:00:00:45.593 6590==
# 2013-10-24T02:20:27 [4058] ==00:00:00:45.723 6590== Conditional jump or move depends on uninitialised value(s)
# 2013-10-24T02:20:27 [4058] ==00:00:00:45.723 6590== at 0x74A506: MYSQL_BIN_LOG::write(Log_event*) (log.cc:5400)
# 2013-10-24T02:20:27 [4058] ==00:00:00:45.723 6590== by 0x576A26: THD::binlog_query(THD::enum_binlog_query_type, char const*, unsigned long, bool, bool, bool, int) (sql_class.cc:5846)
# 2013-10-24T02:20:27 [4058] ==00:00:00:45.723 6590== by 0x60168D: mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool) (sql_table.cc:2368)
# 2013-10-24T02:20:27 [4058] ==00:00:00:45.723 6590== by 0x60187C: mysql_rm_table(THD*, TABLE_LIST*, char, char) (sql_table.cc:1960)
# 2013-10-24T02:20:27 [4058] ==00:00:00:45.723 6590== by 0x59B428: mysql_execute_command(THD*) (sql_parse.cc:3680)
# 2013-10-24T02:20:27 [4058] ==00:00:00:45.723 6590== by 0x5A029A: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:6417)
# 2013-10-24T02:20:27 [4058] ==00:00:00:45.723 6590== by 0x5A03F1: wsrep_mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:6221)
# 2013-10-24T02:20:27 [4058] ==00:00:00:45.723 6590== by 0x5A3945: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1245)
# 2013-10-24T02:20:27 [4058] ==00:00:00:45.723 6590== by 0x5A4366: do_command(THD*) (sql_parse.cc:874)
# 2013-10-24T02:20:27 [4058] ==00:00:00:45.723 6590== by 0x64105E: do_handle_one_connection(THD*) (sql_connect.cc:1526)
# 2013-10-24T02:20:27 [4058] ==00:00:00:4...

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXC-979

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers