ID:               31408
 Updated by:       [EMAIL PROTECTED]
 Reported By:      php at bust dot ac
-Status:           Assigned
+Status:           Closed
 Bug Type:         Reproducible crash
 Operating System: RedHat 9
 PHP Version:      5.0.3
 Assigned To:      wez
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




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

[2005-01-04 16:25:48] [EMAIL PROTECTED]

I could verify this one...

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

[2005-01-04 15:35:40] php at bust dot ac

Description:
------------
using the stream_socket_recvfrom function in php 5.0.3 seems to leak
memory.

my php is running with php.ini-recommended with the only changes being
report_zend_debug = on
display_errors = on

=== output of php -i ===
PHP Version => 5.0.3

System => Linux *************** 2.4.20-8 #1 Thu Mar 13 17:54:28 EST
2003 i686
Build Date => Jan  4 2005 13:46:18
Configure Command =>  './configure' '--with-apxs2=/usr/sbin/apxs'
'--enable-sockets' '--with-mysql' '--with-mhash' '--with-dom'
'--enable-memory-limit' '--enable-debug'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /usr/local/Zend/etc/php.ini
PHP API => 20031224
PHP Extension => 20041030
Zend Extension => 220040412
Debug Build => yes
Thread Safety => disabled
IPv6 Support => enabled
Registered PHP Streams => php, file, http, ftp
Registered Stream Socket Transports => tcp, udp, unix, udg



Reproduce code:
---------------
<?php
        $sp = stream_socket_client( 'tcp://www.google.com:80',$null,
$null2, 30);
        stream_set_blocking($sp, false);
        while (true){
                $gtCheck = stream_socket_recvfrom($sp, 1500);
                echo 'loop = '.$count++."\n";
        }
?>


Expected result:
----------------
script should run forever

Actual result:
--------------
=== end of script output ===
loop = 5551

Fatal error: Allowed memory size of 8388608 bytes exhausted at
/usr/src/php-5.0.3/ext/standard/streamsfuncs.c:330 (tried to allocate
1501 bytes) in /root/test.php on line 5
Allowed memory size of 8388608 bytes exhausted at
/usr/src/php-5.0.3/Zend/zend_stack.c:28 (tried to allocate 256 bytes)


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


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

Reply via email to