diff options
author | Remi Collet <fedora@famillecollet.com> | 2014-11-02 09:32:04 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2014-11-02 09:32:04 +0100 |
commit | ef4877a7043e5f6f00ba0142c18be7e4003c3b02 (patch) | |
tree | 3c3b07ba162d1fd39db45484a1c050f7d4ca6272 /php-5.4.34-bug63595.patch | |
parent | e3dcfa856d93126856dc9e9b25fc2c634cf35c2c (diff) |
php 5.4:
- new version of systzdata patch, fix case sensitivity
- gmp: fix memory management conflict with other libraries
using libgmp, backport fix for https://bugs.php.net/63595
Diffstat (limited to 'php-5.4.34-bug63595.patch')
-rw-r--r-- | php-5.4.34-bug63595.patch | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/php-5.4.34-bug63595.patch b/php-5.4.34-bug63595.patch new file mode 100644 index 0000000..7df8438 --- /dev/null +++ b/php-5.4.34-bug63595.patch @@ -0,0 +1,72 @@ +From 3c925b18fa96043e5d7e86f9ce544b143c3c2079 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@php.net> +Date: Mon, 27 Oct 2014 07:45:34 +0100 +Subject: [PATCH] Fix bug #63595 GMP memory management conflicts with other + libraries using GMP + +Drop use of php memory allocators as this raise various conflicts +with other extensions and libraries which use libgmp. + +No other solution found. +We cannot for ensure correct use of allocator with shared lib. + +Some memory can allocated before php init +Some memory can be freed after php shutdown + +Known broken run cases +- php + curl + gnutls + gmp +- mod_gnutls + mod_php + gnutls + gmp +- php + freetds + gnutls + gmp +- php + odbc + freetds + gnutls + gmp +- php + php-mapi (zarafa) + gnutls + gmp +--- + ext/gmp/gmp.c | 26 -------------------------- + 1 file changed, 26 deletions(-) + +diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c +index f51bd8c..b1553fa 100644 +--- a/ext/gmp/gmp.c ++++ b/ext/gmp/gmp.c +@@ -324,30 +324,6 @@ static void _php_gmpnum_free(zend_rsrc_list_entry *rsrc TSRMLS_DC); + # define MAX_BASE 36 + #endif + +-/* {{{ gmp_emalloc +- */ +-static void *gmp_emalloc(size_t size) +-{ +- return emalloc(size); +-} +-/* }}} */ +- +-/* {{{ gmp_erealloc +- */ +-static void *gmp_erealloc(void *ptr, size_t old_size, size_t new_size) +-{ +- return erealloc(ptr, new_size); +-} +-/* }}} */ +- +-/* {{{ gmp_efree +- */ +-static void gmp_efree(void *ptr, size_t size) +-{ +- efree(ptr); +-} +-/* }}} */ +- + /* {{{ ZEND_GINIT_FUNCTION + */ + static ZEND_GINIT_FUNCTION(gmp) +@@ -369,8 +345,6 @@ ZEND_MODULE_STARTUP_D(gmp) + #endif + REGISTER_STRING_CONSTANT("GMP_VERSION", (char *)gmp_version, CONST_CS | CONST_PERSISTENT); + +- mp_set_memory_functions(gmp_emalloc, gmp_erealloc, gmp_efree); +- + return SUCCESS; + } + /* }}} */ +-- +2.1.0 + |