#42846 [NEW]: Memory Leak in socket_recv and socket_read
| From: | brendoncrawford at gmail dot com | Date: | Wed, 03 Oct 2007 21:38:40 +0000 |
| Subject: | #42846 [NEW]: Memory Leak in socket_recv and socket_read | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-118160@lists.php.net to get a copy of this message | ||
From: brendoncrawford at gmail dot com
Operating system: OSX 10.4
PHP version: 5.2.4
PHP Bug Type: Sockets related
Bug description: Memory Leak in socket_recv and socket_read
Description:
------------
Each call to socket_recv (or socket_read) leaks small amount of memory
despite efforts to free up variables.
Reproduce code:
---------------
As far as I can tell, this is always reproduceable.
Please see:
http://pastebin.com/f342f6b99
Expected result:
----------------
Memory usage to decline back to original state before client connect.
Actual result:
--------------
If you simply connect and disconnect, you will see no problem. However, if
you send data you will see memory usage slowly increasing.
--
Edit bug report at http://bugs.php.net/?id=42846&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42846&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42846&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42846&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=42846&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=42846&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=42846&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=42846&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=42846&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=42846&r=support
Expected behavior: http://bugs.php.net/fix.php?id=42846&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=42846&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=42846&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=42846&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42846&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=42846&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=42846&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=42846&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=42846&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=42846&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=42846&r=mysqlcfg