summaryrefslogtreecommitdiff
path: root/ext/opcache
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2013-06-25 13:47:50 +0800
committerXinchen Hui <laruence@php.net>2013-06-25 13:47:50 +0800
commit157ccaf507b7a94c43db4ec1b7321aac5cc68e8b (patch)
tree73cbb713edb176b2353a533acc1aeff0f73cd720 /ext/opcache
parentefd3c72de3e736758b5a94194228ea1415049789 (diff)
downloadphp-git-157ccaf507b7a94c43db4ec1b7321aac5cc68e8b.tar.gz
Fixed bug #64827 Segfault in zval_mark_grey (zend_gc.c)
I can not get a reproduce script since the context is very strict. Of course I will try to make one, but for now, I just commit this first.
Diffstat (limited to 'ext/opcache')
-rw-r--r--ext/opcache/ZendAccelerator.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index 4d983976bb..efd902f431 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -2163,7 +2163,10 @@ static void accel_fast_zval_ptr_dtor(zval **zval_ptr)
case IS_CONSTANT_ARRAY: {
TSRMLS_FETCH();
+ GC_REMOVE_ZVAL_FROM_BUFFER(zvalue);
if (zvalue->value.ht && (zvalue->value.ht != &EG(symbol_table))) {
+ /* break possible cycles */
+ Z_TYPE_P(zvalue) = IS_NULL;
zvalue->value.ht->pDestructor = (dtor_func_t)accel_fast_zval_ptr_dtor;
accel_fast_hash_destroy(zvalue->value.ht);
}
@@ -2173,6 +2176,7 @@ static void accel_fast_zval_ptr_dtor(zval **zval_ptr)
{
TSRMLS_FETCH();
+ GC_REMOVE_ZVAL_FROM_BUFFER(zvalue);
Z_OBJ_HT_P(zvalue)->del_ref(zvalue TSRMLS_CC);
}
break;