Edit report at https://bugs.php.net/bug.php?id=60558&edit=1
ID: 60558 Updated by: g...@php.net Reported by: larue...@php.net Summary: Invalid read and writes Status: Re-Opened Type: Bug Package: Scripting Engine problem PHP Version: 5.4.0RC3 Block user comment: N Private report: N New Comment: Ideally, it should not be different :-/ Will try to find time soon. Thanks Stefan Previous Comments: ------------------------------------------------------------------------ [2011-12-19 12:46:04] larue...@php.net There must be something difference between traits and class while doing inheritance, but I can't figure out, gron, plz look at this... my previous attempt failed. ------------------------------------------------------------------------ [2011-12-19 12:00:25] larue...@php.net didn't fixed, introduced new memory leak. ------------------------------------------------------------------------ [2011-12-19 10:07:08] 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. ah, worked out, fixed :) thanks ------------------------------------------------------------------------ [2011-12-19 09:58:07] larue...@php.net Automatic comment from SVN on behalf of laruence Revision: http://svn.php.net/viewvc/?view=revision&revision=321158 Log: Fixed bug #60558 (Invalid read and writes) ------------------------------------------------------------------------ [2011-12-19 08:55:16] larue...@php.net seems something wrong with the refcount of zval in traits's default_properties_table[i]. but I have not figured out what's going wrong. A more simple test: <?php trait A { private $hello = 0; } class BaseWithTPropB{ use A; } class SubclassB extends BaseWithTPropB { use A; } $b = new SubClassB; var_dump($b); ?> plz run valgrind like: USE_ZEND_ALLOC=0 valgrind --db-attach=yes --leak-check=full php test.php ------------------------------------------------------------------------ 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=60558 -- Edit this bug report at https://bugs.php.net/bug.php?id=60558&edit=1