php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80045 memleak after two set_exception_handler calls with __call
Submitted: 2020-09-03 07:10 UTC Modified: -
From: sjon@php.net Assigned:
Status: Closed Package: *General Issues
PHP Version: 8.0.0beta2 OS: archLinux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sjon@php.net
New email:
PHP Version: OS:

 

 [2020-09-03 07:10 UTC] 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 ===


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-09-03 08:31 UTC] nikic@php.net
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
 [2020-09-03 08:31 UTC] nikic@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 17:01:29 2024 UTC