php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13672 Memory leak
Submitted: 2001-10-15 08:53 UTC Modified: 2002-01-02 14:03 UTC
From: mh at bang dot ca Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0.6 OS: RH Linux (2.2.16-22)
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: mh at bang dot ca
New email:
PHP Version: OS:

 

 [2001-10-15 08:53 UTC] mh at bang dot ca
Doing mtrace on libphp4.so returns:

- 0000000000 Realloc 6161 was never alloc'd 
- 0000000000 Realloc 6163 was never alloc'd 
- 0000000000 Realloc 6168 was never alloc'd 
- 0000000000 Realloc 7007 was never alloc'd 
- 0000000000 Realloc 7015 was never alloc'd 
- 0000000000 Realloc 7023 was never alloc'd 

Memory not freed:
-----------------
   Address     Size     Caller
0000000000        0  at 

I have tried the latest CVS build, but it won't compile with zlib:


zlib.c:115: `STANDARD_MODULE_HEADER' undeclared here (not in a function)
zlib.c:115: initializer element is not constant
zlib.c:115: (near initialization for `php_zlib_module_entry.name')
zlib.c:116: warning: initialization from incompatible pointer type
zlib.c:117: warning: initialization from incompatible pointer type
zlib.c:122: warning: initialization from incompatible pointer type
zlib.c:123: `NO_VERSION_YET' undeclared here (not in a function)
zlib.c:123: initializer element is not constant
zlib.c:123: (near initialization for `php_zlib_module_entry.global_shutdown_func')
zlib.c:124: warning: initialization makes integer from pointer without a cast
zlib.c:124: warning: initialization makes integer from pointer without a cast
zlib.c:124: warning: initialization makes integer from pointer without a cast
zlib.c:124: warning: excess elements in struct initializer
zlib.c:124: warning: (near initialization for `php_zlib_module_entry')
zlib.c:125: warning: excess elements in struct initializer
zlib.c:125: warning: (near initialization for `php_zlib_module_entry')
make[3]: *** [zlib.lo] Error 1
make[3]: Leaving directory `/usr/local/bang_setup/php4-200110141200/ext/zlib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/bang_setup/php4-200110141200/ext/zlib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/bang_setup/php4-200110141200/ext'
make: *** [all-recursive] Error 1

My config line for PHP is:

--with-apxs=/usr/local/apache/bin/apxs' '--enable-force-cgi-redirect' '-with-png-dir=/usr/local/bang_setup/libpng-1.0.11/' '--with-zlib-dir=/usr/local/bang_setup/zlib-1.1.3/' '--enable-ftp' '--with-gd=/usr/local/bang_setup/gd-1.8.4' '--with-jpeg-dir=/usr/local/' '--with-mysql=/usr/local' '--enable-gd-imgstrttf' '--with-imap' '--with-ldap=/usr/local' '--enable-gd-native-ttf' '--enable-trans-sid' '--with-mcrypt'

Some of our websites have become erratic, to the point where some scripts would sometimes return:

Cannot use assign-op operators with overloaded object
s nor string offsets

on something as simple as 
$table[$i] .= "something";

This last problem has been circumvented by

$var .= "something";
$table[$i] = $var;

but now rather than the above-mentioned error, the script outputs the letter "F".

I wish I could be more accurate, but I have no idea why this started happening, but I suspect the memory leak. I haven't been able to come up with a test case, and my script is a little unwieldy.

Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-12 07:16 UTC] yohgaki@php.net
Do you still have this problem with 4.1.0?
 [2002-01-02 14:03 UTC] lobbin@php.net
No feedback. Closing.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Sep 09 09:01:27 2024 UTC