Replace one Valgrind suppression for OpenSSL with a deallocation

Bug #1341067 reported by Laurynas Biveinis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Fix Released
Low
Laurynas Biveinis
5.6
Fix Released
Low
Laurynas Biveinis

Bug Description

=== modified file 'mysql-test/valgrind.supp'
--- mysql-test/valgrind.supp 2013-10-01 14:35:36 +0000
+++ mysql-test/valgrind.supp 2014-07-10 10:26:41 +0000
@@ -1045,16 +1045,6 @@
 }

 {
- OpenSSL still reachable.
- Memcheck:Leak
- fun:malloc
- fun:CRYPTO_malloc
- fun:sk_new
- ...
- fun:SSL_COMP_get_compression_methods
- fun:SSL_library_init
-}
-{
    BUG#14801497 CONDITIONAL JUMP OR MOVE DEPENDS ON UNINITIALISED VALUE(S) IN CREATE_TMP_TABLE
    Memcheck:Cond
    fun:_Z16create_tmp_tableP3THDP15TMP_TABLE_PARAMR4ListI4ItemEP8st_orderbbyyPKc

=== modified file 'vio/vio.c'
--- vio/vio.c 2014-02-17 11:12:40 +0000
+++ vio/vio.c 2014-07-10 11:49:48 +0000
@@ -368,5 +368,6 @@
   ERR_free_strings();
   EVP_cleanup();
   CRYPTO_cleanup_all_ex_data();
+ sk_SSL_COMP_free(SSL_COMP_get_compression_methods());
 #endif
 }

tags: added: ci upstream valgrind
Revision history for this message
Arkadiusz Miśkiewicz (arekm) wrote :

This causes collision when using php which loads mysql module (linked with percona libs) and curl module (that uses libcurl). Both, percona and curl are trying to free the same global data.

https://github.com/curl/curl/issues/905

Why percona doesn't use proper API - SSL_COMP_free_compression_methods() ?

SSL_COMP_free_compression_methods() uses sk_pop_free() which is protected from double free.

--- percona-server-5.6.28-76.1/vio/vio.c~ 2016-01-08 23:12:24.000000000 +0100
+++ percona-server-5.6.28-76.1/vio/vio.c 2016-07-19 18:54:23.648042457 +0200
@@ -399,6 +399,6 @@ void vio_end(void)
   ERR_free_strings();
   EVP_cleanup();
   CRYPTO_cleanup_all_ex_data();
- sk_SSL_COMP_free(SSL_COMP_get_compression_methods());
+ SSL_COMP_free_compression_methods();
 #endif
 }

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Thanks for the heads-up, opened bug 1604676 for this.

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-2077

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.