Bug #43303 Conditional jump valgrind warning for backup_backupdir

Submitted: 2 Mar 2009 10:21 Modified: 27 Mar 2009 0:02
Reporter: Rafal Somla Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Backup Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Chuck Bell CPU Architecture:Any
Tags: pushbuild failure, unitialized value, valgrind

[2 Mar 2009 10:21] Rafal Somla
Description:
When running backup_backupdir with valgrind it reports the following problems:

> ==2705== Conditional jump or move depends on uninitialised value(s)
> ==2705==    at 0x8263362: String::c_ptr() (sql_string.h:98)
> ==2705==    by 0x833E556: sys_check_backupdir(THD*, set_var*) (set_var.cc:2953)
> ==2705==    by 0x833E011: sys_var_str::check(THD*, set_var*) (set_var.cc:993)
> ==2705==    by 0x833F94A: set_var::check(THD*) (set_var.cc:4000)
> ==2705==    by 0x8340C53: sql_set_variables(THD*, List<set_var_base>*) (set_var.cc:3907)
> ==2705==    by 0x832F2FF: mysql_execute_command(THD*) (sql_parse.cc:3487)
> ==2705==    by 0x8333AB6: mysql_parse(THD*, char const*, unsigned, char const**) (sql_parse.cc:5812)
> ==2705==    by 0x8334A8F: dispatch_command(enum_server_command, THD*, char*, unsigned) (sql_parse.cc:1057)
> ==2705==    by 0x8335DAA: do_command(THD*) (sql_parse.cc:739)
> ==2705==    by 0x83229A6: handle_one_connection (sql_connect.cc:1146)
> ==2705==    by 0x404F0BC: start_thread (in /lib/tls/libpthread-2.3.6.so)
> ==2705==    by 0x42829ED: clone (in /lib/tls/libc-2.3.6.so)
> ==2705== 
> ==2705== Conditional jump or move depends on uninitialised value(s)
> ==2705==    at 0x891E9D5: dirname_length (mf_dirname.c:33)
> ==2705==    by 0x891EA54: dirname_part (mf_dirname.c:73)
> ==2705==    by 0x833E593: sys_check_backupdir(THD*, set_var*) (set_var.cc:2957)
> ==2705==    by 0x833E011: sys_var_str::check(THD*, set_var*) (set_var.cc:993)
> ==2705==    by 0x833F94A: set_var::check(THD*) (set_var.cc:4000)
> ==2705==    by 0x8340C53: sql_set_variables(THD*, List<set_var_base>*) (set_var.cc:3907)
> ==2705==    by 0x832F2FF: mysql_execute_command(THD*) (sql_parse.cc:3487)
> ==2705==    by 0x8333AB6: mysql_parse(THD*, char const*, unsigned, char const**) (sql_parse.cc:5812)
> ==2705==    by 0x8334A8F: dispatch_command(enum_server_command, THD*, char*, unsigned) (sql_parse.cc:1057)
> ==2705==    by 0x8335DAA: do_command(THD*) (sql_parse.cc:739)
> ==2705==    by 0x83229A6: handle_one_connection (sql_connect.cc:1146)
> ==2705==    by 0x404F0BC: start_thread (in /lib/tls/libpthread-2.3.6.so)
> ==2705==    by 0x42829ED: clone (in /lib/tls/libc-2.3.6.so)
> ==2705== 
> ==2705== Conditional jump or move depends on uninitialised value(s)
> ==2705==    at 0x8263362: String::c_ptr() (sql_string.h:98)
> ==2705==    by 0x833F139: sys_update_backupdir(THD*, set_var*) (set_var.cc:3006)
> ==2705==    by 0x8344766: sys_var_str::update(THD*, set_var*) (set_var.h:278)
> ==2705==    by 0x83379D9: set_var::update(THD*) (set_var.cc:4049)
> ==2705==    by 0x8340CDC: sql_set_variables(THD*, List<set_var_base>*) (set_var.cc:3914)
> ==2705==    by 0x832F2FF: mysql_execute_command(THD*) (sql_parse.cc:3487)
> ==2705==    by 0x8333AB6: mysql_parse(THD*, char const*, unsigned, char const**) (sql_parse.cc:5812)
> ==2705==    by 0x8334A8F: dispatch_command(enum_server_command, THD*, char*, unsigned) (sql_parse.cc:1057)
> ==2705==    by 0x8335DAA: do_command(THD*) (sql_parse.cc:739)
> ==2705==    by 0x83229A6: handle_one_connection (sql_connect.cc:1146)
> ==2705==    by 0x404F0BC: start_thread (in /lib/tls/libpthread-2.3.6.so)
> ==2705==    by 0x42829ED: clone (in /lib/tls/libc-2.3.6.so)

These are in the code handling the @@backupdir variable.

How to repeat:
Run "./mtr backup_backupdir --valgrind" and see server's error log.
[6 Mar 2009 20:44] Chuck Bell
Working to fix valgrind errors in PB.
[6 Mar 2009 21:24] 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/68561

2787 Chuck Bell	2009-03-06
      BUG#43303 : Conditional jump valgrind warning for backup_backupdir
      
      This warning was being issued because the end of the string 
      for Ptr[] was not being marked. The safe call ensures this
      happens and therefore avoids the valgrind warning.
      modified:
        sql/set_var.cc
[9 Mar 2009 10:21] Jørgen Løland
Good to push
[9 Mar 2009 11:36] Ingo Strüwing
Approved.
[26 Mar 2009 12:35] Bugs System
Pushed into 6.0.11-alpha (revid:alik@sun.com-20090326121822-pt84kzxxayzho4mn) (version source revid:charles.bell@sun.com-20090309134019-vr480npdp30f2gvh) (merge vers: 6.0.11-alpha) (pib:6)
[27 Mar 2009 0:02] Paul DuBois
Noted in 6.0.11 changelog.

Assigning a value to the backupdir system variable resulted in
Valgrind errors.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.058 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.