mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
3b853c97f3
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.
23 lines
476 B
PHP
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===
|