]> granicus.if.org Git - php/commit
Fixed bug #60536 (Traits Segfault)
authorXinchen Hui <laruence@php.net>
Fri, 16 Dec 2011 19:02:52 +0000 (19:02 +0000)
committerXinchen Hui <laruence@php.net>
Fri, 16 Dec 2011 19:02:52 +0000 (19:02 +0000)
commit01dc47631ea044f0df75a1e59d1313ca96a6ba66
tree17dd30b7377da159d419889c4663c233361dc82f
parente467a791d3111438ea1160c22b986d24bd09450e
Fixed bug #60536 (Traits Segfault)
# this is a tough one, I think I should explain
# Zend use zend_object->properties_table both as zval ** and zval ***
# if a zend_object->properties is not initialized, the properties_table is zval **
# while in rebuild_object_properties, zend will store the zval ** to zend_object->properties
# then stash the zval ***(ie, zobj->properties_table[0] is zval ** now) to  zobj->properties_table[0]
# so when a zend_object inherit form multi parent and these parent have a same property_info->offset
# properties, will result in a repeat zval **->zval ** transform, which will lead to a segmentfault
# *may be* this fix is not the best fix, we should not use this tricky way, and rewrite this mechanism.
NEWS
Zend/tests/bug60536_001.phpt [new file with mode: 0644]
Zend/tests/bug60536_002.phpt [new file with mode: 0644]
Zend/tests/bug60536_003.phpt [new file with mode: 0644]
Zend/tests/bug60536_004.phpt [new file with mode: 0644]
Zend/tests/bug60536_005.phpt [new file with mode: 0644]
Zend/zend_object_handlers.c