Fixed segfault (Zend/tests/026.phpt now pass)

This commit is contained in:
Xinchen Hui 2014-02-20 15:39:46 +08:00
parent ff61b46941
commit b917458490
5 changed files with 55 additions and 50 deletions

View file

@ -129,7 +129,7 @@ ZEND_API void zend_objects_store_del(zend_object *object TSRMLS_DC) /* {{{ */
*/
if (EG(objects_store).object_buckets &&
IS_VALID(EG(objects_store).object_buckets[object->handle])) {
if (object->gc.refcount == 0) {
if (object->gc.refcount == 1) {
int failure = 0;
if (!(object->gc.u.v.flags & IS_OBJ_DESTRUCTOR_CALLED)) {
@ -146,7 +146,7 @@ ZEND_API void zend_objects_store_del(zend_object *object TSRMLS_DC) /* {{{ */
}
}
if (object->gc.refcount == 0) {
if (object->gc.refcount == 1) {
zend_uint handle = object->handle;
//??? GC_REMOVE_ZOBJ_FROM_BUFFER(obj);