Bug #56882 binlog_base64_flag fails on valgrind and win debug max platforms
Submitted: 20 Sep 2010 22:54 Modified: 30 Nov 2010 22:23
Reporter: Luis Soares Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:mysql-next-mr-bugfixing OS:Any
Assigned to: Luis Soares CPU Architecture:Any
Tags: valgrind

[20 Sep 2010 22:54] Luis Soares
Description:
The test case binlog.binlog_base64_flag fails on vagrind run, 
for mysql-next-mr-bugfixing with the following symptom:

binlog.binlog_base64_flag                [ fail ]  Found warnings/errors in server log file!
        Test ended at 2010-09-19 00:52:31
line
==18052== Thread 13:
==18052== Conditional jump or move depends on uninitialised value(s)
==18052==    at 0x8841A5: mysql_client_binlog_statement(THD*) (sql_binlog.cc:303)
==18052==    by 0x5C7C5F: mysql_execute_command(THD*) (sql_parse.cc:4326)
==18052==    by 0x5C8597: mysql_parse(THD*, char*, unsigned, Parser_state*) (sql_parse.cc:5591)
==18052==    by 0x5C9BC9: dispatch_command(enum_server_command, THD*, char*, unsigned) (sql_parse.cc:1130)
==18052==    by 0x5CB033: do_command(THD*) (sql_parse.cc:802)
==18052==    by 0x69DE00: do_handle_one_connection(THD*) (sql_connect.cc:1192)
==18052==    by 0x69DEFC: handle_one_connection (sql_connect.cc:1131)
==18052==    by 0x8CD2FE: pfs_spawn_thread (pfs.cc:1061)
==18052==    by 0x3F6D606366: start_thread (in /lib64/libpthread-2.5.so)
==18052==    by 0x3F6CAD30AC: clone (in /lib64/libc-2.5.so)
^ Found warnings in /export/home2/pb2/test/sb_0-2290534-1284845216.13/mysql-5.6.99-m5-linux-x86_64-test/mysql-test/var-n_mix/log/mysqld.1.err
ok

It also fails for x86 and x86_64 debug max on windows.

Details:
  - tree:  mysql-next-mr-bugfixing
  - revid: alfranio.correia@oracle.com-20100920121236-sxo39h0p2dc47omn

How to repeat:
win x86 debug max   : http://tinyurl.com/2gaxeg4
win x86_64 debug max: http://tinyurl.com/25ne3uh
valgrind            : http://tinyurl.com/24kkd9q

Suggested fix:
Initialize the uninitialized variable.
[20 Sep 2010 23:02] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/118653

3295 Luis Soares	2010-09-21
      BUG#56882: binlog_base64_flag fails on valgrind and win debug 
                 max platforms
      
      In some cases, the variable err in mysql_client_binlog_statement
      would not be initialized but still some conditional jumps would
      rely on its value. This is for instance the case when a BINLOG
      event is truncated and it returns an error. In this case the
      'err' variable is not initialized at that time, but we jump to
      the label 'end' and then check the following condition: 
      
       if ((error || err) && ... )
      
      This makes valgrind complain that there is a conditional jump or
      move depending on an uninitialized value.
      
      We fix this by initializing the variable err to 0.
[21 Sep 2010 11:35] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/118704

3298 Luis Soares	2010-09-21
      BUG#56882: binlog_base64_flag fails on valgrind and win debug 
                 max platforms
            
      In some cases, the variable err in mysql_client_binlog_statement
      would not be initialized but still some conditional jumps would
      rely on its value. This is for instance the case when a BINLOG
      event is truncated and it returns an error. In this case the
      'err' variable is not initialized at that time, but we jump to
      the label 'end' and then check the following condition: 
            
         if ((error || err) && ... )
            
      This makes valgrind complain that there is a conditional jump or
      move depending on an uninitialized value.
      
      We fix this by initializing the variable err to 0.
[21 Sep 2010 11:41] Luis Soares
Queued in mysql-next-mr-bugfixing:
- http://pb2.norway.sun.com/web.py?template=push_details&push=1588818
[2 Oct 2010 18:15] Bugs System
Pushed into mysql-next-mr (revid:alexander.nozdrin@oracle.com-20101002181053-6iotvl26uurcoryp) (version source revid:alexander.nozdrin@oracle.com-20101002180917-h0n62akupm3z20nt) (pib:21)
[13 Nov 2010 16:17] Bugs System
Pushed into mysql-trunk 5.6.99-m5 (revid:alexander.nozdrin@oracle.com-20101113155825-czmva9kg4n31anmu) (version source revid:vasil.dimov@oracle.com-20100629074804-359l9m9gniauxr94) (merge vers: 5.6.99-m4) (pib:21)
[30 Nov 2010 22:23] Jon Stephens
Issue does not appear in any release. No changelog entry necessary. Closed without further action.