Fix a memory leak in tracig JIT when the same closure is called through Closure::call() and natively. Closure::call() makes a temporary copy of original closure function, modifies its sc
Fix a memory leak in tracig JIT when the same closure is called through Closure::call() and natively. 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.
show more ...
|