Bug #80045 [Opn->Csd]: memleak after two set_exception_handler calls with __call
| From: | nikic@php.net | Date: | Thu, 03 Sep 2020 08:31:09 +0000 |
| Subject: | Bug #80045 [Opn->Csd]: memleak after two set_exception_handler calls with __call | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-228855@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80045&edit=1
ID: 80045
Updated by: nikic@php.net
Reported by: sjon@php.net
Summary: memleak after two set_exception_handler calls with
__call
-Status: Open
+Status: Closed
Type: Bug
Package: *General Issues
Operating System: archLinux
PHP Version: 8.0.0beta2
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of nikita.ppv@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=3b853c97f3e74d4bb3dbdcfe847e1441a2e9dcb5
Log: Fixed bug #80045
Previous Comments:
------------------------------------------------------------------------
[2020-09-03 07:10:26] sjon@php.net
Description:
------------
php8 reports a memleak after two set_exception_handler calls combined with an __call
Test script:
---------------
class x {
public function __construct(){
$h = set_exception_handler([$this, 'dummyExceptionHandler']);
$h = set_exception_handler([$this, 'dummyExceptionHandler']);
}
public function __call($m, $p) {}
}
new x;
Actual result:
--------------
php-8.0.0beta2/Zend/zend_object_handlers.c(1120) : Freeing 0x00007fd2ab25d780 (232 bytes),
script=/tmp/memleak.php
=== Total 1 memory leaks detected ===
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80045&edit=1