php-src/Zend/tests/bug80045.phpt
Nikita Popov 3b853c97f3 Fixed bug #80045
Applying the obvious fix ... however, I think we may need to
rething how we handle trampoline fcc for "f" zpp. It might make
sense to use fcc->function_handler == NULL for that case and
force it to be fetched in zend_call_function instead (it will
be reset to that after the call anyway). Otherwise we will keep
chasing these leaks, as it's the only instance where it's
necessary to free a zpp result.
2020-09-03 10:29:18 +02:00

23 lines
476 B
PHP

--TEST--
Bug #80045: memleak after two set_exception_handler calls with __call
--FILE--
<?php
class x {
public function __construct(){
set_exception_handler([$this, 'dummyExceptionHandler']);
set_exception_handler([$this, 'dummyExceptionHandler']);
set_error_handler([$this, 'dummyErrorHandler']);
set_error_handler([$this, 'dummyErrorHandler']);
}
public function __call($m, $p) {}
}
new x;
?>
===DONE===
--EXPECT--
===DONE===