Bug #60536 [ReO->Csd]: Traits Segfault
| From: | laruence@php.net | Date: | Mon, 19 Dec 2011 04:08:05 +0000 |
| Subject: | Bug #60536 [ReO->Csd]: Traits Segfault | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-165959@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60536&edit=1
ID: 60536
Updated by: laruence@php.net
Reported by: scottmac@php.net
Summary: Traits Segfault
-Status: Re-Opened
+Status: Closed
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:
this invalid read is not introduced by this fix, so let's keep this closed,
I have filed a new one #60558, thanks
Previous Comments:
------------------------------------------------------------------------
[2011-12-18 18:31:59] tony2001@php.net
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.
------------------------------------------------------------------------
[2011-12-17 14:26:18] gron@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] laruence@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] laruence@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] laruence@php.net
I hava another fix for this. I am going to ci it.
------------------------------------------------------------------------
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