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

Proposed by Laurynas Biveinis on 2014-07-12
Status: Merged
Approved by: Sergei Glushchenko on 2014-08-05
Approved revision: 671
Merged at revision: 691
Proposed branch: lp:~laurynas-biveinis/percona-server/bug1334743-5.5
Merge into: lp:percona-server/5.5
Diff against target: 61 lines (+12/-0)
4 files modified
mysql-test/mysql-test-run.pl (+1/-0)
sql/mysqld.cc (+5/-0)
sql/slave.cc (+1/-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
Sergei Glushchenko (community) g2 2014-07-12 Approve on 2014-08-05
Review via email: mp+226576@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.

Approve

review: Approve (g2)

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 13:07:55 +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 13:07:55 +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 'sql/slave.cc'
37--- sql/slave.cc 2014-03-05 12:38:27 +0000
38+++ sql/slave.cc 2014-07-12 13:07:55 +0000
39@@ -3179,6 +3179,7 @@
40
41 DBUG_LEAVE; // Must match DBUG_ENTER()
42 my_thread_end();
43+ ERR_remove_state(0);
44 pthread_exit(0);
45 return 0; // Avoid compiler warnings
46 }
47
48=== modified file 'vio/vio.c'
49--- vio/vio.c 2013-01-30 09:55:26 +0000
50+++ vio/vio.c 2014-07-12 13:07:55 +0000
51@@ -310,5 +310,10 @@
52 {
53 #ifdef HAVE_YASSL
54 yaSSL_CleanUp();
55+#elif defined(HAVE_OPENSSL)
56+ ERR_free_strings();
57+ EVP_cleanup();
58+ CRYPTO_cleanup_all_ex_data();
59+ sk_SSL_COMP_free(SSL_COMP_get_compression_methods());
60 #endif
61 }

Subscribers

People subscribed via source and target branches