Merge lp:~laurynas-biveinis/percona-server/bug1334743-5.5 into lp:percona-server/5.5

Proposed by Laurynas Biveinis on 2014-07-12
Status: Superseded
Proposed branch: lp:~laurynas-biveinis/percona-server/bug1334743-5.5
Merge into: lp:percona-server/5.5
Diff against target: 49 lines (+11/-0)
3 files modified
mysql-test/mysql-test-run.pl (+1/-0)
sql/mysqld.cc (+5/-0)
vio/vio.c (+5/-0)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/bug1334743-5.5
Reviewer Review Type Date Requested Status
Registry Administrators 2014-07-12 Pending
Review via email: mp+226575@code.launchpad.net

Description of the change

Fix bug 1334743 (Numerous Valgrind errors in OpenSSL).

Add the necessary OpenSSL library calls to release its allocated
memory. The patch is based on lp:mysql-server/5.6 rev 4591.1.60
with some extra cleanups.

At the same time, mark Valgrind error of still reachable memory as an
MTR Valgrind reporter error.

http://jenkins.percona.com/job/percona-server-5.5-param/1024/
http://jenkins.percona.com/job/percona-server-5.5-valgrind/368/

To post a comment you must log in.

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'mysql-test/mysql-test-run.pl'
--- mysql-test/mysql-test-run.pl 2014-03-27 15:42:21 +0000
+++ mysql-test/mysql-test-run.pl 2014-07-12 12:55:30 +0000
@@ -5978,6 +5978,7 @@
5978 $err_in_report= 1 if $line =~ /ERROR SUMMARY: [1-9]/;5978 $err_in_report= 1 if $line =~ /ERROR SUMMARY: [1-9]/;
5979 $err_in_report= 1 if $line =~ /definitely lost: [1-9]/;5979 $err_in_report= 1 if $line =~ /definitely lost: [1-9]/;
5980 $err_in_report= 1 if $line =~ /possibly lost: [1-9]/;5980 $err_in_report= 1 if $line =~ /possibly lost: [1-9]/;
5981 $err_in_report= 1 if $line =~ /still reachable: [1-9]/;
5981 }5982 }
5982 }5983 }
59835984
59845985
=== modified file 'sql/mysqld.cc'
--- sql/mysqld.cc 2014-03-27 15:42:21 +0000
+++ sql/mysqld.cc 2014-07-12 12:55:30 +0000
@@ -2122,6 +2122,10 @@
21222122
2123 thd->disconnect();2123 thd->disconnect();
21242124
2125#ifdef HAVE_OPENSSL
2126 ERR_remove_state(0);
2127#endif
2128
2125 MYSQL_CONNECTION_DONE((int) sql_errno, thd->thread_id);2129 MYSQL_CONNECTION_DONE((int) sql_errno, thd->thread_id);
21262130
2127 if (MYSQL_CONNECTION_DONE_ENABLED())2131 if (MYSQL_CONNECTION_DONE_ENABLED())
@@ -3797,6 +3801,7 @@
3797 ssl_acceptor_fd= new_VioSSLAcceptorFd(opt_ssl_key, opt_ssl_cert,3801 ssl_acceptor_fd= new_VioSSLAcceptorFd(opt_ssl_key, opt_ssl_cert,
3798 opt_ssl_ca, opt_ssl_capath,3802 opt_ssl_ca, opt_ssl_capath,
3799 opt_ssl_cipher, &error);3803 opt_ssl_cipher, &error);
3804 ERR_remove_state(0);
3800 DBUG_PRINT("info",("ssl_acceptor_fd: 0x%lx", (long) ssl_acceptor_fd));3805 DBUG_PRINT("info",("ssl_acceptor_fd: 0x%lx", (long) ssl_acceptor_fd));
3801 if (!ssl_acceptor_fd)3806 if (!ssl_acceptor_fd)
3802 {3807 {
38033808
=== modified file 'vio/vio.c'
--- vio/vio.c 2013-01-30 09:55:26 +0000
+++ vio/vio.c 2014-07-12 12:55:30 +0000
@@ -310,5 +310,10 @@
310{310{
311#ifdef HAVE_YASSL311#ifdef HAVE_YASSL
312 yaSSL_CleanUp();312 yaSSL_CleanUp();
313#elif defined(HAVE_OPENSSL)
314 ERR_free_strings();
315 EVP_cleanup();
316 CRYPTO_cleanup_all_ex_data();
317 sk_SSL_COMP_free(SSL_COMP_get_compression_methods());
313#endif318#endif
314}319}

Subscribers

People subscribed via source and target branches