Bug #16149 Updated: Memory leak with refcount limit.

From: Date: Tue, 19 Mar 2002 09:36:20 +0000
Subject: Bug #16149 Updated: Memory leak with refcount limit.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-2849@lists.php.net to get a copy of this message
ID: 16149 Updated by: yohgaki@php.net -Summary: Segmentation fault Reported By: vincent@ecbar.com -Status: Feedback +Status: Analyzed -Bug Type: Arrays related +Bug Type: Scripting Engine problem -Operating System: redhat 6.2 +Operating System: ANY -PHP Version: 4.1.2 +PHP Version: 4.2.1-dev New Comment: This must be refcount limitation. I see memory leak with 4.2.1-dev and 4.2.0-dev. Scripting engine problem. This problem may be suspended. It's not simple to fix. May be we should let PHP die if refcount reached it's limit. [yohgaki@dev HEAD]$ ./sapi/cli/php <?php $file = "-----"; for ($i = 0; $i<9000 ; $i++) { $result_array["one"][$i] = $file; $result_array["two"][$i] = $file; $result_array["three"][$i] = $file; $result_array["four"][$i] = $file; $result_array["five"][$i] = $file; $result_array["six"][$i] = $file; $result_array["seven"][$i] = $file; $result_array["eight"][$i] = $file; } echo "done<BR>"; ?> done<BR> [Tue Mar 19 18:41:50 2002] Script: '-' --------------------------------------- /home/yohgaki/cvs/php/HEAD/Zend/zend_execute.h(62) : Block 0x082AC068 status: Beginning: Cached (allocated on /home/yohgaki/cvs/php/HEAD/Zend/zend_execute.c:467, 12 bytes) End: OK --------------------------------------- [yohgaki@dev HEAD]$ ./sapi/cli/php -v 4.2.1-dev [yohgaki@dev HEAD]$ Previous Comments: ------------------------------------------------------------------------ [2002-03-19 04:22:35] sander@php.net To properly diagnose this bug, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". ------------------------------------------------------------------------ [2002-03-18 13:13:50] vincent@ecbar.com try the follow code, it works on 4.0.6 but "Segmentation fault (core dumped)" on CGI version and give no error message (and appear to keep executing the code few more times on other httpd child process too) on dynamic apache module version. i've memory limited to 8M, and it's fine when for lopp as "$i<8000". <?php $file = "-----"; for ($i = 0; $i<9000 ; $i++) { $result_array["one"][$i] = $file; $result_array["two"][$i] = $file; $result_array["three"][$i] = $file; $result_array["four"][$i] = $file; $result_array["five"][$i] = $file; $result_array["six"][$i] = $file; $result_array["seven"][$i] = $file; $result_array["eight"][$i] = $file; } echo "done<BR>"; ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=16149&edit=1

« previous php.bugs (#2849) next »