One more crash in PHP 5.4

From: Date: Sun, 29 Jan 2012 16:07:51 +0000
Subject: One more crash in PHP 5.4
Groups: php.internals 
Request: Send a blank email to internals+get-57557@lists.php.net to get a copy of this message
in zend_vm_execute.h:701 PHP free's the function struct in case of ZEND_OVERLOADED_FUNCTION. the problem is that in PHP 5.4, the opline calling the function hast a pointer to the very same struct in it's cache_slot. when this opcode is called againg, the cache is used and it crashes. my suggested fix is not to cache ZEND_OVERLOADED_FUNCTION, it does solve the problem and makes sense to me logically. it is also possible to not free it and let it be re-used from cache_slot. my pacth is attached.

Attachment: [text/x-patch] php_5.4.0RC6_zend_vm_execute_no_cache+overloaded.diff
« previous php.internals (#57557) next »