[Pkg-php-commits] [php/debian-sid] Cherry pick patch to fix a memory leak in the cyclical gc

Raphael Geissert geissert at debian.org
Sat May 1 19:21:42 UTC 2010


---
 debian/patches/series                        |    1 +
 debian/patches/upstream/gc_memory_leak.patch |   16 ++++++++++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)
 create mode 100644 debian/patches/upstream/gc_memory_leak.patch

diff --git a/debian/patches/series b/debian/patches/series
index 82c602b..7f8c1fc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -57,3 +57,4 @@ upstream/mysqli_ssl.patch
 upstream/pdo_reset_error_beginTransaction.patch
 upstream/define_json_error_utf8.patch
 upstream/SplFileInfo_getPathName_parent.patch
+upstream/gc_memory_leak.patch
diff --git a/debian/patches/upstream/gc_memory_leak.patch b/debian/patches/upstream/gc_memory_leak.patch
new file mode 100644
index 0000000..cd2238a
--- /dev/null
+++ b/debian/patches/upstream/gc_memory_leak.patch
@@ -0,0 +1,16 @@
+Description: Fix memory leak in cyclical garbage collector
+Origin: http://svn.php.net/viewvc?view=revision&revision=298213
+Last-Update: 2010-05-01
+
+Index: php/Zend/zend_execute.c
+===================================================================
+--- php.orig/Zend/zend_execute.c
++++ php/Zend/zend_execute.c
+@@ -708,6 +708,7 @@ static inline zval* zend_assign_to_varia
+ 				return variable_ptr;
+ 			}
+ 		} else { /* we need to split */
++			GC_ZVAL_CHECK_POSSIBLE_ROOT(*variable_ptr_ptr);
+ 			if (!is_tmp_var) {
+ 				if (PZVAL_IS_REF(value) && Z_REFCOUNT_P(value) > 0) {
+ 					ALLOC_ZVAL(variable_ptr);
-- 
1.6.5





More information about the Pkg-php-commits mailing list