php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26077 Memory leaks when creating an instance of an object
Submitted: 2003-11-02 05:53 UTC Modified: 2004-01-09 08:50 UTC
Votes:3
Avg. Score:3.7 ± 0.9
Reproduced:3 of 3 (100.0%)
Same Version:1 (33.3%)
Same OS:3 (100.0%)
From: john@php.net Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 5CVS, 4CVS OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: john@php.net
New email:
PHP Version: OS:

 

 [2003-11-02 05:53 UTC] john@php.net
Description:
------------
ZE2 will leak when creating an instance of an object which does not actually get assigned to a variable

Reproduce code:
---------------
php -r 'class foo {} new foo();'


Actual result:
--------------
/home/john/working/php-src/Zend/zend_execute.c(3098) :  Freeing 0x400D9BE0 (44 bytes), script=-
/home/john/working/php-src/Zend/zend_API.c(713) : Actual location (location was relayed)
/home/john/working/php-src/Zend/zend_API.c(714) :  Freeing 0x400D9790 (32 bytes), script=-
/home/john/working/php-src/Zend/zend_hash.c(157) : Actual location (location was relayed)
/home/john/working/php-src/Zend/zend_execute.c(3097) :  Freeing 0x400D9060 (16 bytes), script=-
/home/john/working/php-src/Zend/zend_objects.c(106) :  Freeing 0x400D9018 (12 bytes), script=-
=== Total 4 memory leaks detected ===


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-11-04 01:00 UTC] sniper@php.net
Same seems to happen with PHP 4 too:

/usr/src/php4/Zend/zend_API.c(594) :  Freeing 0x0864B604 (44 bytes), script=-
/usr/src/php4/Zend/zend_API.c(582) : Actual location (location was relayed)
/usr/src/php4/Zend/zend_hash.c(188) :  Freeing 0x0864B30C (32 bytes), script=-
/usr/src/php4/Zend/zend_execute.c(1979) :  Freeing 0x0864ABCC (12 bytes), script=-

 [2004-01-09 08:50 UTC] stas@php.net
This bug has been fixed in CVS.

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/.
 
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 Nov 21 12:01:29 2024 UTC