php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62915 Memory leak when cloning unconstructed object
Submitted: 2012-08-23 23:17 UTC Modified: 2012-08-26 21:54 UTC
From: felipe@php.net Assigned: cataphract (profile)
Status: Closed Package: I18N and L10N related
PHP Version: Irrelevant OS:
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: felipe@php.net
New email:
PHP Version: OS:

 

 [2012-08-23 23:17 UTC] felipe@php.net
Description:
------------
See below.

Test script:
---------------
<?php

class foo extends IntlTimeZone {
	public $foo = 'test';
	
	public function __construct() { }
}

$x = new foo;

try {
	$z = clone $x;
} catch (Exception $e) {
	var_dump($e->getMessage());
}


Actual result:
--------------
/home/felipe/dev/php-src/Zend/zend_API.c(1097) :  Freeing 0x7F4A715F1288 (32 bytes), script=-
[Thu Aug 23 20:13:00 2012]  Script:  '-'
/home/felipe/dev/php-src/Zend/zend_API.c(1098) :  Freeing 0x7F4A715F1DD8 (5 bytes), script=-
/home/felipe/dev/php-src/Zend/zend_variables.c(121) : Actual location (location was relayed)
=== Total 2 memory leaks detected ===]]>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-08-23 23:39 UTC] felipe@php.net
Same problem is reproducible with:
- NumberFormatter
- MessageFormatter
- IntlDateFormatter
 [2012-08-24 02:27 UTC] laruence@php.net
Hmm, wrong usage at first,  I think this should be marked as a low priority task. 
:)
 [2012-08-24 15:16 UTC] laruence@php.net
-Assigned To: +Assigned To: cataphract
 [2012-08-24 15:16 UTC] laruence@php.net
maybe you can also take care of this :)
 [2012-08-26 21:54 UTC] cataphract@php.net
-Status: Assigned +Status: Closed
 [2012-08-26 21:54 UTC] cataphract@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC