Edit report at https://bugs.php.net/bug.php?id=63305&edit=1
ID: 63305 Updated by: larue...@php.net Reported by: johan dot groth at sorona dot se Summary: zend_mm_heap corrupted with traits -Status: Assigned +Status: Closed Type: Bug Package: Scripting Engine problem Operating System: All PHP Version: 5.4.8 Assigned To: dmitry Block user comment: N Private report: N New Comment: Automatic comment on behalf of laruence Revision: http://git.php.net/?p=php-src.git;a=commit;h=74228c515197c8a3bda878a077d30c9b14482eb2 Log: Fixed bug #63305 (zend_mm_heap corrupted with traits) Previous Comments: ------------------------------------------------------------------------ [2012-10-22 11:20:40] larue...@php.net A simple reproduce script: <?php new Attachment(""); function __autoload($class) { switch ($class) { case "Attachment": eval(<<<'PHP' class Attachment extends File { } PHP ); break; case "File": eval(<<<'PHP' class File { use TDatabaseObject { TDatabaseObject::__construct as private databaseObjectConstruct; } public function __construct() { } } PHP ); break; case "TDatabaseObject": eval(<<<'PHP' trait TDatabaseObject { public function __construct() { } } PHP ); break; } return TRUE; } ------------------------------------------------------------------------ [2012-10-22 10:25:59] larue...@php.net thanks, I can reproduce now, dmitry, seems related to the previous traits bug we fixed. ------------------------------------------------------------------------ [2012-10-22 06:38:15] johan dot groth at sorona dot se I could not find a way to upload anything to this report so I created a temporary repository over at github with the source. I hope this is OK, you can find it here: https://github.com/jgroth/php-crash Something I found interesting while removing as much code as possible from my application was that I could not remove comments for some methods in some of the classes/interfaces. Doing so would not reproduce the bug. Also, when I turned off error reporting, I did not get the bug either. Note that there is one "Notice" error reported by PHP in this test application. I do not have any such errors in the full application, but still got a php crash. ------------------------------------------------------------------------ [2012-10-20 04:39:27] larue...@php.net great, if it's okey, you can tar your application as a reproduce script for us ------------------------------------------------------------------------ [2012-10-19 12:35:49] johan dot groth at sorona dot se Ok, so I have somewhat been able to reproduce the problem. I can still not do it in a small script, but I have been able to remove enough code from my application so I can send it to anyone who might be looking into this issue. The application is based on CodeIgniter, so it's basicly the CI code + a few extra files from my application. ------------------------------------------------------------------------ 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=63305 -- Edit this bug report at https://bugs.php.net/bug.php?id=63305&edit=1