cvs: ZendEngine2 / zend_gc.c
[email protected] ("Dmitry Stogov") Mon, 09 Feb 2009 08:55:35 -0000
| Newsgroups | php.zend-engine.cvs |
|---|---|
| Message-ID | <cvsdmitry1234169735@cvsserver> |
dmitry Mon Feb 9 08:55:35 2009 UTC
Modified files:
/ZendEngine2 zend_gc.c
Log:
Better fix for #47341
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_gc.c?r1=1.20&r2=1.21&diff_format=u
Index: ZendEngine2/zend_gc.c
diff -u ZendEngine2/zend_gc.c:1.20 ZendEngine2/zend_gc.c:1.21
--- ZendEngine2/zend_gc.c:1.20 Sun Feb 8 19:30:01 2009
+++ ZendEngine2/zend_gc.c Mon Feb 9 08:55:35 2009
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_gc.c,v 1.20 2009/02/08 19:30:01 derick Exp $ */
+/* $Id: zend_gc.c,v 1.21 2009/02/09 08:55:35 dmitry Exp $ */
#include "zend.h"
#include "zend_API.h"
@@ -51,8 +51,8 @@
gc_globals->buf = NULL;
- gc_globals->roots.next = NULL;
- gc_globals->roots.prev = NULL;
+ gc_globals->roots.next = &gc_globals->roots;
+ gc_globals->roots.prev = &gc_globals->roots;
gc_globals->unused = NULL;
gc_globals->zval_to_free = NULL;
gc_globals->free_list = NULL;
@@ -109,10 +109,10 @@
GC_G(zobj_marked_grey) = 0;
#endif
- if (GC_G(buf)) {
- GC_G(roots).next = &GC_G(roots);
- GC_G(roots).prev = &GC_G(roots);
+ GC_G(roots).next = &GC_G(roots);
+ GC_G(roots).prev = &GC_G(roots);
+ if (GC_G(buf)) {
GC_G(unused) = NULL;
GC_G(first_unused) = GC_G(buf);
@@ -527,7 +527,7 @@
{
int count = 0;
- if (GC_G(roots).next != &GC_G(roots) && GC_G(roots).next) {
+ if (GC_G(roots).next != &GC_G(roots)) {
zval_gc_info *p, *q, *orig_free_list, *orig_next_to_free;
if (GC_G(gc_active)) {