Edit report at https://bugs.php.net/bug.php?id=60536&edit=1
ID: 60536 Updated by: tony2...@php.net Reported by: scott...@php.net Summary: Traits Segfault -Status: Closed +Status: Re-Opened Type: Bug Package: Scripting Engine problem Operating System: ubuntu 11.11 PHP Version: 5.4SVN-2011-12-15 (SVN) Assigned To: laruence Block user comment: N Private report: N New Comment: Valgrind complains about invalid read and writes in the tests: http://dev.daylessday.org/diff/bug60536_001.mem http://dev.daylessday.org/diff/bug60536_003.mem So the problem is definitely not fixed yet. Previous Comments: ------------------------------------------------------------------------ [2011-12-17 14:26:18] g...@php.net Automatic comment from SVN on behalf of gron Revision: http://svn.php.net/viewvc/?view=revision&revision=321089 Log: Fixed inconsistent and broken handling of private properties in traits. # The handling of private properties in classes is now consistent with private properties in traits. # Perviously, privates could cause strict warnings, are were not properly merged into the class when # the parent class had a private property of the same name. Now, we introduce it without notice, # since it is a new and independent property, just like in normal classes. # This problem was diagnosed while working on Bug #60536. ------------------------------------------------------------------------ [2011-12-16 19:03:04] larue...@php.net This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. ------------------------------------------------------------------------ [2011-12-16 19:02:31] larue...@php.net Automatic comment from SVN on behalf of laruence Revision: http://svn.php.net/viewvc/?view=revision&revision=321073 Log: 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. ------------------------------------------------------------------------ [2011-12-16 18:43:37] larue...@php.net I hava another fix for this. I am going to ci it. ------------------------------------------------------------------------ [2011-12-16 16:47:05] g...@php.net property008.phpt demonstrates the actual issue. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=60536 -- Edit this bug report at https://bugs.php.net/bug.php?id=60536&edit=1