mirror of
https://github.com/php/php-src.git
synced 2026-03-29 11:42:17 +02:00
Closure::call() makes a temporary copy of original closure function, modifies its scope, resets ZEND_ACC_CLOSURE flag and call it through zend_call_function(). As result the same function may be called with and without ZEND_ACC_CLOSURE flag, that confuses JIT and may lead to memory leak or even worse memory errors. The patch allocates "fake" closure object and keep ZEND_ACC_CLOSURE flag to always behave in the same way.