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
1=== modified file 'mysql-test/mysql-test-run.pl'
2--- mysql-test/mysql-test-run.pl 2014-03-27 15:42:21 +0000
3+++ mysql-test/mysql-test-run.pl 2014-07-12 12:55:30 +0000
4@@ -5978,6 +5978,7 @@
5 $err_in_report= 1 if $line =~ /ERROR SUMMARY: [1-9]/;
6 $err_in_report= 1 if $line =~ /definitely lost: [1-9]/;
7 $err_in_report= 1 if $line =~ /possibly lost: [1-9]/;
8+ $err_in_report= 1 if $line =~ /still reachable: [1-9]/;
9 }
10 }
11
12
13=== modified file 'sql/mysqld.cc'
14--- sql/mysqld.cc 2014-03-27 15:42:21 +0000
15+++ sql/mysqld.cc 2014-07-12 12:55:30 +0000
16@@ -2122,6 +2122,10 @@
17
18 thd->disconnect();
19
20+#ifdef HAVE_OPENSSL
21+ ERR_remove_state(0);
22+#endif
23+
24 MYSQL_CONNECTION_DONE((int) sql_errno, thd->thread_id);
25
26 if (MYSQL_CONNECTION_DONE_ENABLED())
27@@ -3797,6 +3801,7 @@
28 ssl_acceptor_fd= new_VioSSLAcceptorFd(opt_ssl_key, opt_ssl_cert,
29 opt_ssl_ca, opt_ssl_capath,
30 opt_ssl_cipher, &error);
31+ ERR_remove_state(0);
32 DBUG_PRINT("info",("ssl_acceptor_fd: 0x%lx", (long) ssl_acceptor_fd));
33 if (!ssl_acceptor_fd)
34 {
35
36=== modified file 'vio/vio.c'
37--- vio/vio.c 2013-01-30 09:55:26 +0000
38+++ vio/vio.c 2014-07-12 12:55:30 +0000
39@@ -310,5 +310,10 @@
40 {
41 #ifdef HAVE_YASSL
42 yaSSL_CleanUp();
43+#elif defined(HAVE_OPENSSL)
44+ ERR_free_strings();
45+ EVP_cleanup();
46+ CRYPTO_cleanup_all_ex_data();
47+ sk_SSL_COMP_free(SSL_COMP_get_compression_methods());
48 #endif
49 }

Subscribers

People subscribed via source and target branches