com php-src: Fix refcount reaching 2^32 - 1 for resources Happens e.g. in proc_close() when nothing is referencing the file handles, e.g. they have
refcount 0 w hen passed to zend_list_close() and then ze nd_list_delete() which decrements it to (ui nt32_t) -1: Zend/zend_list.c

From: Date: Sun, 25 Oct 2015 17:47:50 +0000
Subject: com php-src: Fix refcount reaching 2^32 - 1 for resources Happens e.g. in proc_close() when nothing is referencing the file handles, e.g. they have
refcount 0 w hen passed to zend_list_close() and then ze nd_list_delete() which decrements it to (ui nt32_t) -1: Zend/zend_list.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-89526@lists.php.net to get a copy of this message
Commit: ac58d21aa38ca00ab9698cecfa05c8e0ff1e8d4a Author: Bob Weinand <bobwei9@hotmail.com> Sun, 25 Oct 2015 18:47:50 +0100 Parents: a0665f3a18819168a1d319ae208ca3afd565415a Branches: PHP-7.0 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ac58d21aa38ca00ab9698cecfa05c8e0ff1e8d4a Log: Fix refcount reaching 2^32 - 1 for resources Happens e.g. in proc_close() when nothing is referencing the file handles, e.g. they have refcount 0 when passed to zend_list_close() and then zend_list_delete() which decrements it to (uint32_t) -1 Changed paths: M Zend/zend_list.c Diff: diff --git a/Zend/zend_list.c b/Zend/zend_list.c index e38246e..d86f8ae 100644 --- a/Zend/zend_list.c +++ b/Zend/zend_list.c @@ -84,7 +84,7 @@ static void zend_resource_dtor(zend_resource *res) ZEND_API int zend_list_close(zend_resource *res) { if (GC_REFCOUNT(res) <= 0) { - return zend_list_delete(res); + return zend_list_free(res); } else if (res->type >= 0) { zend_resource_dtor(res); }

« previous php.cvs (#89526) next »