Patch bug60598 for Reproducible crash Bug #60598
Patch version 2013-08-29 11:09 UTC
Return to Bug #60598 |
Download this patch
Patch Revisions:
Developer: laruence@php.net
diff --git a/Zend/zend_objects_API.c b/Zend/zend_objects_API.c
index 1fe5d0c..b5dd48f 100644
--- a/Zend/zend_objects_API.c
+++ b/Zend/zend_objects_API.c
@@ -57,6 +57,11 @@ ZEND_API void zend_objects_store_call_destructors(zend_objects_store *objects TS
obj->dtor(obj->object, i TSRMLS_CC);
obj = &objects->object_buckets[i].bucket.obj;
obj->refcount--;
+
+ if (obj->refcount == 0) {
+ /* in case gc_collect_cycle is triggered before free_storage */
+ GC_REMOVE_ZOBJ_FROM_BUFFER(obj);
+ }
}
}
}
|