From:             dominique dot fournier at grenoble dot cnrs dot fr dot 
Operating system: Linux
PHP version:      5.2.8
PHP Bug Type:     Streams related
Bug description:  Memory leak in stream_socket_client when Zend is active

Description:
------------
When export USE_ZEND_ALLOC=1, before run the following script in CLI,
there is a memory_leak.
When export USE_ZEND_ALLOC=0, the script leave on the same value.
The IP in the script is available, but the port is closed (no service
available on this port).

Reproduce code:
---------------
<?
  for ($i =0 ; $i <30 ; $i++)
  {
    $...@stream_socket_client('tcp://127.0.0.1:800', $error, $err);
    unset ($fp);
    unset ($error);
    unset ($err);
    echo memory_get_usage()."\n";
  }
?>


Expected result:
----------------
Always the same value (in my case, when ALLOC=0, 8200)

Actual result:
--------------
49936
50016
50044
... repeat with an increment 30 times

-- 
Edit bug report at http://bugs.php.net/?id=47090&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=47090&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=47090&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=47090&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=47090&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=47090&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=47090&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=47090&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=47090&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=47090&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=47090&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=47090&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=47090&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=47090&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=47090&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=47090&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=47090&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=47090&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=47090&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=47090&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=47090&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=47090&r=mysqlcfg

Reply via email to