Bug #13672 Updated: Memory leak

From: Date: Wed, 02 Jan 2002 19:03:45 +0000
Subject: Bug #13672 Updated: Memory leak
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-75652@lists.php.net to get a copy of this message
ID: 13672
Updated by: lobbin
Reported By: mh@bang.ca
Old Status: Feedback
Status: Closed
Bug Type: Scripting Engine problem
Operating System: RH Linux (2.2.16-22)
PHP Version: 4.0.6
New Comment:

No feedback. Closing.

Previous Comments:
------------------------------------------------------------------------

[2001-12-12 07:16:06] yohgaki@php.net

Do you still have this problem with 4.1.0?

------------------------------------------------------------------------

[2001-10-15 08:53:52] mh@bang.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.

------------------------------------------------------------------------



Edit this bug report at http://bugs.php.net/?id=13672&edit=1



Thread (3 messages)

« previous php.dev (#75652) next »