mysql client started with \u or \U in prompt throws warnings about lost memory on exit
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Committed
|
Low
|
Sergei Golubchik |
Bug Description
MariaDB client, if started in interactive mode with \u or \U in the --prompt string, produces the warnings on exit:
Bye
Warning: 8 bytes lost, allocated at sql-common/
Warning: 92 bytes lost, allocated at sql-common/
Warning: 8164 bytes lost, allocated at mysys/my_
Memory lost: 8264 bytes in 3 chunks
If it is run with valgrind, then in additional to the "usual" warnings (upstream bug http://
Warning: 8 bytes lost, allocated at ==31367== Conditional jump or move depends on uninitialised value(s)
==31367== at 0x42488FA: vfprintf (in /lib/libc-
==31367== by 0x424A397: buffered_vfprintf (in /lib/libc-
==31367== by 0x424528A: vfprintf (in /lib/libc-
==31367== by 0x424FB6E: fprintf (in /lib/libc-
==31367== by 0x80AA698: print_stack (safemalloc.c:230)
==31367== by 0x80AA9D8: sf_terminate (safemalloc.c:330)
==31367== by 0x423577E: __run_exit_handlers (in /lib/libc-
==31367== by 0x42357DC: exit (in /lib/libc-
==31367== by 0x80621DA: mysql_end (mysql.cc:1297)
==31367== by 0x8061F37: main (mysql.cc:1248)
==31367==
==31367== Syscall param write(buf) points to uninitialised byte(s)
==31367== at 0x42C991B: ??? (in /lib/libc-
==31367== by 0x42707D0: _IO_file_
==31367== by 0x42704B3: new_do_write (in /lib/libc-
==31367== by 0x427076D: _IO_file_
==31367== by 0x424A436: buffered_vfprintf (in /lib/libc-
==31367== by 0x424528A: vfprintf (in /lib/libc-
==31367== by 0x424FB6E: fprintf (in /lib/libc-
==31367== by 0x80AA698: print_stack (safemalloc.c:230)
==31367== by 0x80AA9D8: sf_terminate (safemalloc.c:330)
==31367== by 0x423577E: __run_exit_handlers (in /lib/libc-
==31367== by 0x42357DC: exit (in /lib/libc-
==31367== by 0x80621DA: mysql_end (mysql.cc:1297)
==31367== Address 0xbef035f0 is on thread 1's stack
bzr version-info
revision-id: <email address hidden>
date: 2012-03-15 00:37:37 +0100
build-date: 2012-03-15 21:43:37 +0400
revno: 3331
Not reproducible on MariaDB 5.3 (revno 3459).
Not reproducible on MySQL trunk (revno 3706).
To reproduce,
- build a debug version of MariaDB client;
- start MariaDB or MySQL server;
- start the client as mysql --prompt="\u " <other valid connection parameters>
- say 'exit' in the prompt
=> see the warnings.
Related branches
Changed in maria: | |
status: | New → Fix Committed |
Also filed in JIRA as MDEV-182