Valgrind warnings exposed by prototest

Bug #542161 reported by Eric Day
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle
Fix Released
Medium
Eric Day
Cherry
Fix Released
Medium
Eric Day

Bug Description

CURRENT_TEST: mysql_protocol.prototest
==14257== Thread 17:
==14257== Conditional jump or move depends on uninitialised value(s)
==14257== at 0x4C28029: strlen (mc_replace_strmem.c:242)
==14257== by 0x7D8120: ClientMySQLProtocol::checkConnection() (mysql_protocol.cc:736)
==14257== by 0x7D819D: ClientMySQLProtocol::authenticate() (mysql_protocol.cc:141)
==14257== by 0x5EF081: drizzled::Session::run() (session.cc:667)
==14257== by 0x166E9651: session_thread (multi_thread.h:67)
==14257== by 0x63293B9: start_thread (in /lib/libpthread-2.9.so)
==14257== by 0x6623FCC: clone (in /lib/libc-2.9.so)
==14257==
==14257== Thread 18:
==14257== Conditional jump or move depends on uninitialised value(s)
==14257== at 0x4C28038: strlen (mc_replace_strmem.c:242)
==14257== by 0x7D8120: ClientMySQLProtocol::checkConnection() (mysql_protocol.cc:736)
==14257== by 0x7D819D: ClientMySQLProtocol::authenticate() (mysql_protocol.cc:141)
==14257== by 0x5EF081: drizzled::Session::run() (session.cc:667)
==14257== by 0x166E9651: session_thread (multi_thread.h:67)
==14257== by 0x63293B9: start_thread (in /lib/libpthread-2.9.so)
==14257== by 0x6623FCC: clone (in /lib/libc-2.9.so)
==14257==
==14257== Conditional jump or move depends on uninitialised value(s)
==14257== at 0x7D8113: ClientMySQLProtocol::checkConnection() (mysql_protocol.cc:736)
==14257== by 0x7D819D: ClientMySQLProtocol::authenticate() (mysql_protocol.cc:141)
==14257== by 0x5EF081: drizzled::Session::run() (session.cc:667)
==14257== by 0x166E9651: session_thread (multi_thread.h:67)
==14257== by 0x63293B9: start_thread (in /lib/libpthread-2.9.so)
==14257== by 0x6623FCC: clone (in /lib/libc-2.9.so)
==14257==
==14257== Use of uninitialised value of size 8
==14257== at 0x4C28022: strlen (mc_replace_strmem.c:242)
==14257== by 0x7D8120: ClientMySQLProtocol::checkConnection() (mysql_protocol.cc:736)
==14257== by 0x7D819D: ClientMySQLProtocol::authenticate() (mysql_protocol.cc:141)
==14257== by 0x5EF081: drizzled::Session::run() (session.cc:667)
==14257== by 0x166E9651: session_thread (multi_thread.h:67)
==14257== by 0x63293B9: start_thread (in /lib/libpthread-2.9.so)
==14257== by 0x6623FCC: clone (in /lib/libc-2.9.so)
==14257==
==14257== Conditional jump or move depends on uninitialised value(s)
==14257== at 0x7D8062: ClientMySQLProtocol::checkConnection() (mysql_protocol.cc:738)
==14257== by 0x7D819D: ClientMySQLProtocol::authenticate() (mysql_protocol.cc:141)
==14257== by 0x5EF081: drizzled::Session::run() (session.cc:667)
==14257== by 0x166E9651: session_thread (multi_thread.h:67)
==14257== by 0x63293B9: start_thread (in /lib/libpthread-2.9.so)
==14257== by 0x6623FCC: clone (in /lib/libc-2.9.so)
==14257==
==14257== Thread 17:
==14257== Use of uninitialised value of size 8
==14257== at 0x4C28034: strlen (mc_replace_strmem.c:242)
==14257== by 0x7D8120: ClientMySQLProtocol::checkConnection() (mysql_protocol.cc:736)
==14257== by 0x7D819D: ClientMySQLProtocol::authenticate() (mysql_protocol.cc:141)
==14257== by 0x5EF081: drizzled::Session::run() (session.cc:667)
==14257== by 0x166E9651: session_thread (multi_thread.h:67)
==14257== by 0x63293B9: start_thread (in /lib/libpthread-2.9.so)
==14257== by 0x6623FCC: clone (in /lib/libc-2.9.so)
==14257==
==14257== Invalid read of size 1
==14257== at 0x4C28034: strlen (mc_replace_strmem.c:242)
==14257== by 0x7D8120: ClientMySQLProtocol::checkConnection() (mysql_protocol.cc:736)
==14257== by 0x7D819D: ClientMySQLProtocol::authenticate() (mysql_protocol.cc:141)
==14257== by 0x5EF081: drizzled::Session::run() (session.cc:667)
==14257== by 0x166E9651: session_thread (multi_thread.h:67)
==14257== by 0x63293B9: start_thread (in /lib/libpthread-2.9.so)
==14257== by 0x6623FCC: clone (in /lib/libc-2.9.so)
==14257== Address 0x1242ff07 is 0 bytes after a block of size 16,391 alloc'd
==14257== at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==14257== by 0x7D9132: drizzleclient_net_init (net_serv.cc:70)
==14257== by 0x7D9F90: drizzleclient_net_init_sock (net_serv.cc:97)
==14257== by 0x7D7AD6: ClientMySQLProtocol::ClientMySQLProtocol(int, bool) (mysql_protocol.cc:80)
==14257== by 0x7D7CC6: ListenMySQLProtocol::getClient(int) (mysql_protocol.cc:69)
==14257== by 0x5D4EA4: drizzled::plugin::Listen::getClient() (listen.cc:151)
==14257== by 0x5151DC: main (drizzled.cc:2342)
==14257==
==14257== Invalid read of size 1
==14257== at 0x4C28022: strlen (mc_replace_strmem.c:242)
==14257== by 0x7D8120: ClientMySQLProtocol::checkConnection() (mysql_protocol.cc:736)
==14257== by 0x7D819D: ClientMySQLProtocol::authenticate() (mysql_protocol.cc:141)
==14257== by 0x5EF081: drizzled::Session::run() (session.cc:667)
==14257== by 0x166E9651: session_thread (multi_thread.h:67)
==14257== by 0x63293B9: start_thread (in /lib/libpthread-2.9.so)
==14257== by 0x6623FCC: clone (in /lib/libc-2.9.so)
==14257== Address 0x12d29e24 is not stack'd, malloc'd or (recently) free'd
==14257==
==14257== More than 10000000 total errors detected. I'm not reporting any more.
==14257== Final error counts will be inaccurate. Go fix your program!
==14257== Rerun with --error-limit=no to disable this cutoff. Note
==14257== that errors may occur in your program without prior warning from
==14257== Valgrind, because errors are no longer being displayed.
==14257==
././drizzled/drizzled: Normal shutdown
100319 2:49:06 InnoDB: Starting shutdown...
==14257== Warning: set address range perms: large range [0x7ceb000, 0xffcb000) (noaccess)
100319 2:49:10 InnoDB: Shutdown completed; log sequence number 109323630
==14257==
==14257== ERROR SUMMARY: 10000000 errors from 8 contexts (suppressed: 900 from 4)
==14257== malloc/free: in use at exit: 16,041,744 bytes in 412 blocks.
==14257== malloc/free: 1,808,989 allocs, 1,808,577 frees, 22,257,138,729 bytes allocated.
==14257== For counts of detected errors, rerun with: -v
==14257== Use --track-origins=yes to see where uninitialised values come from
==14257== searching for pointers to 412 not-freed blocks.
==14257== checked 44,523,192 bytes.

Related branches

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.