Description:
This is not a memory leak. It is a warning about conditional jump depending on uninitialized values. The jump is within zlib compression library which is called from within backup code. Here is the report from valgrind:
==4865== Conditional jump or move depends on uninitialised value(s)
==4865== at 0xC5ECD7: longest_match (deflate.c:1121)
==4865== by 0xC5F9A3: deflate_slow (deflate.c:1595)
==4865== by 0xC60184: deflate (deflate.c:790)
==4865== by 0xCE6C8C: backup::Output_stream::close() (stream.cc:456)
==4865== by 0xCDA559: Backup_restore_ctx::close() (kernel.cc:1048)
==4865== by 0xCDB34C: Backup_restore_ctx::do_backup() (kernel.cc:1155)
==4865== by 0xCDC5E7: execute_backup_command(THD*, LEX*, String*, bool, bool) (kernel.cc:206)
==4865== by 0x6C20C9: mysql_execute_command(THD*) (sql_parse.cc:2442)
==4865== by 0x6C58E2: mysql_parse(THD*, char const*, unsigned, char const**) (sql_parse.cc:5802)
==4865== by 0x6C6415: dispatch_command(enum_server_command, THD*, char*, unsigned) (sql_parse.cc:1057)
==4865== by 0x6C6FD2: do_command(THD*) (sql_parse.cc:739)
==4865== by 0x6B8003: handle_one_connection (sql_connect.cc:1146)
==4865== by 0x4C32142: start_thread (in /lib64/libpthread-2.4.so)
==4865== by 0x5268B8C: clone (in /lib64/libc-2.4.so)
I was unable to determine if it is a problem within zlib library or with the way this library is used from within backup code. For all I know, when deflate() is called from backup::Output_stream::close() it is passed a valid z_stream_s object which was previously opened and manipulated using zlib functions only.
How to repeat:
Using current backup tree, run backup_compression test with --valgrind option, then see server's error log which should contain above valgrind stack.