Edit report at https://bugs.php.net/bug.php?id=63180&edit=1
ID: 63180 Updated by: dmi...@php.net Reported by: vesselin dot atanasov at gmail dot com Summary: Corruption of hash tables (bugfix attached) -Status: Assigned +Status: Closed Type: Bug Package: Scripting Engine problem Operating System: Any PHP Version: 5.4Git-2012-09-28 (Git) Assigned To: dmitry Block user comment: N Private report: N New Comment: The fix for this bug has been committed. 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. Previous Comments: ------------------------------------------------------------------------ [2012-10-26 16:54:01] dmi...@php.net Your proposal will work, but it will slowdown every HashTable update operation. However these checks are really necessary only for very few cases. I prefer to fix the problem with a hack. I've just committed the fix. ------------------------------------------------------------------------ [2012-10-26 16:49:51] dmi...@php.net Automatic comment on behalf of dmi...@zend.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=68b229ea73b5e975951b5ad02ffb315ec60fca1e Log: Fixed bug #63180 (Corruption of hash tables) ------------------------------------------------------------------------ [2012-10-01 12:23:06] vesselin dot atanasov at gmail dot com One option would be to store interned pointers without copying when one of the two is true: 1. Either the hash table is non-persistent. 2. Or when the hash table is persistent and (the interned string is below the interned snapshot top or there is no snapshot top defined at all). What do you think of this approach? ------------------------------------------------------------------------ [2012-10-01 11:49:34] dmi...@php.net These tables store internal entities, that are never changed from request to request, and also entities created during compilation and execution, that are destroyed at end of request. ------------------------------------------------------------------------ [2012-10-01 11:39:38] vesselin dot atanasov at gmail dot com I took a look at the EG(function_table), EG(class_table), EG(zend_constants) and indeed they are persistent. What were the reasons for making these tables persistent? Was it just for performance reasons? ------------------------------------------------------------------------ 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=63180 -- Edit this bug report at https://bugs.php.net/bug.php?id=63180&edit=1