Bug #59060 Valgrind warning in Protocol_text::store()

Submitted: 20 Dec 2010 15:55 Modified: 6 Jan 2011 1:19
Reporter: Alexander Nozdrin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: General Severity:S1 (Critical)
Version:5.6 OS:Any
Assigned to: Alexander Nozdrin CPU Architecture:Any
Tags: pb2, test failure

[20 Dec 2010 15:55] Alexander Nozdrin
Description:
==31898== Conditional jump or move depends on uninitialised value(s)
==31898==    at 0x4C21D66: strnlen (mc_replace_strmem.c:259)
==31898==    by 0xBC3B7E: process_str_arg (my_vsnprintf.c:195)
==31898==    by 0xBC587C: my_vsnprintf_ex (my_vsnprintf.c:605)
==31898==    by 0xBC5CBC: my_vsnprintf (my_vsnprintf.c:668)
==31898==    by 0xB8BCDE: DbugVfprintf (dbug.c:1350)
==31898==    by 0xB8BC81: _db_doprnt_ (dbug.c:1335)
==31898==    by 0x55F8E6: Protocol_text::store(char const*, unsigned long, charset_info_st*) (protocol.cc:986)
==31898==    by 0x74F688: Item::send(Protocol*, String*) (item.cc:5932)
==31898==    by 0x55DAD0: Protocol::send_result_set_row(List<Item>*) (protocol.cc:848)
==31898==    by 0x5AA672: select_send::send_data(List<Item>&) (sql_class.cc:1866)
==31898==    by 0x634C37: JOIN::exec() (sql_select.cc:2794)
==31898== by 0x63113A: 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:3554)
==31898==    by 0x637370: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:323)
==31898==    by 0x5D7835: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:4513)
==31898==    by 0x5D879E: mysql_execute_command(THD*) (sql_parse.cc:2096)
==31898==    by 0x5DF6F8: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:5550)

How to repeat:
The warning appears for the following tests:
  - rpl.rpl_corruption
  - rpl.rpl_get_master_version_and_clock

Check out PB for trunk-bugfixing (or trunk-stage).

See also Bug#52304.
[21 Dec 2010 12:21] Alexander Nozdrin
Patch for BUG#49978, BUG#59037 has nothing to do with the warning.
The tests were modified, so this issue started to pop up.
[21 Dec 2010 12: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/127408

3462 Alexander Nozdrin	2010-12-21
      A patch for Bug#59060 (Valgrind warning in Protocol_text::store()).
      
      We should not assume to have zero-terminated strings.
[21 Dec 2010 12:24] Alexander Nozdrin
Pushed to trunk-bugfixing.
[22 Dec 2010 21:30] Bugs System
Pushed into mysql-trunk 5.6.1 (revid:alexander.nozdrin@oracle.com-20101222212842-y0t3ibtd32wd9qaw) (version source revid:alexander.nozdrin@oracle.com-20101222212842-y0t3ibtd32wd9qaw) (merge vers: 5.6.1) (pib:24)
[6 Jan 2011 1:19] Paul DuBois
Bug does not appear in any released version. No changelog entry needed.

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

Page generated in 0.041 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.