cvs: ZendEngine2(PHP_5_3) / zend_gc.c /tests gc_031.phpt
[email protected] ("Derick Rethans") Sun, 08 Feb 2009 19:36:33 -0000
| Newsgroups | php.zend-engine.cvs |
|---|---|
| Message-ID | <cvsderick1234121793@cvsserver> |
derick Sun Feb 8 19:36:33 2009 UTC
Added files: (Branch: PHP_5_3)
/ZendEngine2/tests gc_031.phpt
Modified files:
/ZendEngine2 zend_gc.c
Log:
- MFH: Fixed bug #47341: Calling gc_collect_cycles() with zend.enable_gc=0
causes segfault.
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_gc.c?r1=1.1.2.18&r2=1.1.2.19&diff_format=u
Index: ZendEngine2/zend_gc.c
diff -u ZendEngine2/zend_gc.c:1.1.2.18 ZendEngine2/zend_gc.c:1.1.2.19
--- ZendEngine2/zend_gc.c:1.1.2.18 Fri Jan 2 20:45:41 2009
+++ ZendEngine2/zend_gc.c Sun Feb 8 19:36:33 2009
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_gc.c,v 1.1.2.18 2009/01/02 20:45:41 felipe Exp $ */
+/* $Id: zend_gc.c,v 1.1.2.19 2009/02/08 19:36:33 derick Exp $ */
#include "zend.h"
#include "zend_API.h"
@@ -527,7 +527,7 @@
{
int count = 0;
- if (GC_G(roots).next != &GC_G(roots)) {
+ if (GC_G(roots).next != &GC_G(roots) && GC_G(roots).next) {
zval_gc_info *p, *q, *orig_free_list, *orig_next_to_free;
if (GC_G(gc_active)) {
http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/gc_031.phpt?view=markup&rev=1.1
Index: ZendEngine2/tests/gc_031.phpt
+++ ZendEngine2/tests/gc_031.phpt
--TEST--
GC 031: gc_collect_roots() with GC turned off.
--INI--
zend.enable_gc=0
--FILE--
<?php
gc_collect_cycles();
echo "DONE\n";
?>
--EXPECTF--
DONE