php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37006 memory leaks
Submitted: 2006-04-07 09:16 UTC Modified: 2006-04-07 16:38 UTC
From: info at talte dot net Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 4.4.2 OS: CentOS 4.0 Rel3
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: info at talte dot net
New email:
PHP Version: OS:

 

 [2006-04-07 09:16 UTC] info at talte dot net
Description:
------------
Hello,

Sorry for my bad engish. After some segmentation faults I compiled PHP with --enable-debug, and then I have these memory leaks.

Reproduce code:
---------------
/usr/local/directadmin/customapache/php-4.4.2/Zend/zend_execute.c(276) :  Freeing 0x0C4E2124 (44 bytes), script=/home/jacob/domains/jacobshome.info/public_html/index.php
/usr/local/directadmin/customapache/php-4.4.2/Zend/zend_variables.c(123) : Actual location (location was relayed)
Last leak repeated 2 times
/usr/local/directadmin/customapache/php-4.4.2/Zend/zend_execute.c(1812) :  Freeing 0x0C4E207C (12 bytes), script=/home/jacob/domains/jacobshome.info/public_html/index.php
Last leak repeated 3 times
/usr/local/directadmin/customapache/php-4.4.2/Zend/zend_execute.c(2123) :  Freeing 0x0C4E1FE4 (14 bytes), script=/home/jacob/domains/jacobshome.info/public_html/index.php
/usr/local/directadmin/customapache/php-4.4.2/Zend/zend_variables.c(111) : Actual location (location was relayed)
Last leak repeated 156 times
/usr/local/directadmin/customapache/php-4.4.2/Zend/zend_execute.c(2120) :  Freeing 0x0C4E1FA4 (12 bytes), script=/home/jacob/domains/jacobshome.info/public_html/index.php
Last leak repeated 160 times
/usr/local/directadmin/customapache/php-4.4.2/Zend/zend_execute.c(2100) :  Freeing 0x0C4DCD9C (44 bytes), script=/home/jacob/domains/jacobshome.info/public_html/index.php
/usr/local/directadmin/customapache/php-4.4.2/Zend/zend_API.c(563) : Actual location (location was relayed)
Last leak repeated 14 times
/usr/local/directadmin/customapache/php-4.4.2/Zend/zend_execute.c(2069) :  Freeing 0x0C4DCBD4 (12 bytes), script=/home/jacob/domains/jacobshome.info/public_html/index.php
Last leak repeated 9 times
/usr/local/directadmin/customapache/php-4.4.2/Zend/zend_API.c(680) :  Freeing 0x0C4DC90C (2 bytes), script=/home/jacob/domains/jacobshome.info/public_html/index.php
Last leak repeated 48 times
/usr/local/directadmin/customapache/php-4.4.2/Zend/zend_API.c(679) :  Freeing 0x0C4DC8CC (12 bytes), script=/home/jacob/domains/jacobshome.info/public_html/index.php
Last leak repeated 48 times

Expected result:
----------------
No memory leaks

Actual result:
--------------
Some memory leaks

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-07 09:19 UTC] derick@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.
 [2006-04-07 09:25 UTC] info at talte dot net
Script source:

<?php
// This file will generate and return the main page of the site
$CONF = array();
$CONF['Self'] = 'index.php';

include('./config.php');

selector();

?>

Also I have segfaults with other scripts,

e.g. 
/usr/local/directadmin/customapache/php-4.4.2/Zend/zend_hash.c(453) :  Freeing 0x0C8ECE54 (64 bytes), script=/home/orbita/domains/sportorbita.com/public_html/bulletin/cron.php
Last leak repeated 14 times
/usr/local/directadmin/customapache/php-4.4.2/Zend/zend_execute.c(1786) :  Freeing 0x0C1F49C4 (12 bytes), script=/home/orbita/domains/sportorbita.com/public_html/bulletin/cron.php
Last leak repeated 6 times
/usr/local/directadmin/customapache/php-4.4.2/ext/standard/string.c(569) :  Freeing 0x0C5BF6DC (1 bytes), script=/home/orbita/domains/sportorbita.com/public_html/bulletin/cron.php
/usr/local/directadmin/customapache/php-4.4.2/Zend/zend_execute.c(273) :  Freeing 0x0C3D131C (12 bytes), script=/home/orbita/domains/sportorbita.com/public_html/bulletin/cron.php
Last leak repeated 1 time
/usr/local/directadmin/customapache/php-4.4.2/Zend/zend_execute.c(1670) :  Freeing 0x0C3D0CCC (12 bytes), script=/home/orbita/domains/sportorbita.com/public_html/bulletin/cron.php
Last leak repeated 25 times
/usr/local/directadmin/customapache/php-4.4.2/Zend/zend_execute.c(512) :  Freeing 0x0C40E6E4 (12 bytes), script=/home/orbita/domains/sportorbita.com/public_html/bulletin/cron.php
Last leak repeated 33 times
/usr/local/directadmin/customapache/php-4.4.2/Zend/zend_execute.c(1802) :  Freeing 0x0C41596C (12 bytes), script=/home/orbita/domains/sportorbita.com/public_html/bulletin/cron.php
Last leak repeated 18 times
/usr/local/directadmin/customapache/php-4.4.2/Zend/zend_API.c(680) :  Freeing 0x0C4151CC (364 bytes), script=/home/orbita/domains/sportorbita.com/public_html/bulletin/cron.php
Last leak repeated 37 times
/usr/local/directadmin/customapache/php-4.4.2/Zend/zend_API.c(679) :  Freeing 0x0C3CA204 (12 bytes), script=/home/orbita/domains/sportorbita.com/public_html/bulletin/cron.php
Last leak repeated 37 times
/usr/local/directadmin/customapache/php-4.4.2/Zend/zend_hash.c(199) :  Freeing 0x0C3C836C (32 bytes), script=/home/orbita/domains/sportorbita.com/public_html/bulletin/cron.php
Last leak repeated 122 times
/usr/local/directadmin/customapache/php-4.4.2/Zend/zend_hash.c(275) :  Freeing 0x0C3C77E4 (39 bytes), script=/home/orbita/domains/sportorbita.com/public_html/bulletin/cron.php
Last leak repeated 1680 times

Sceript source: http://www.martynas.info/cron.php.txt
 [2006-04-07 09:34 UTC] info at talte dot net
Also, if you need these:

require_once('./global.php');
require_once(DIR . '/includes/functions_cron.php');

You can find them in http://www.sportorbita.com/bulletin/global.php.txt and http://www.sportorbita.com/bulletin/includes/functions_cron.php.txt

Thank you.
 [2006-04-07 09:39 UTC] tony2001@php.net
Please, try to provide a short but complete reproduce script, without any includes, max 20 lines long.
Thank you.

 [2006-04-07 12:52 UTC] info at talte dot net
I don't know where exacly memory leak is, so I can't do 20 lines from these scripts.
 [2006-04-07 16:38 UTC] tony2001@php.net
Sorry, I doubt we're going to debug your huge scripts.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Fri Apr 03 02:00:01 2026 UTC