mirror of
https://github.com/php/php-src.git
synced 2026-04-11 10:03:18 +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.