ID: 36205 Updated by: [EMAIL PROTECTED] Reported By: alain dot russell at blackpepper dot co dot nz -Status: Open +Status: Assigned Bug Type: Scripting Engine problem Operating System: Mac OSX Server PHP Version: 5.1.2 -Assigned To: +Assigned To: dmitry
Previous Comments: ------------------------------------------------------------------------ [2006-02-09 09:10:03] alain dot russell at blackpepper dot co dot nz sorry .. quick note - the server this runs on has register_globals on .. (I know, we're working on it:p) ------------------------------------------------------------------------ [2006-02-09 09:08:16] alain dot russell at blackpepper dot co dot nz I've managed to track the leak down to the following section of code .. just load this into a page and refresh it a few times to see the leak. It also will not work if it in the root of the virtual host - eg: /leak.php it will not leak, / leak/leak.php and it will .. $gb_loggedin = false; if (isset($storeuser_id)){ //cookie is available if ($storeuser_id != "") { $gb_loggedin = true; //reset cookie just to make sure. setcookie ("storeuser_id", $storeuser_id,time() +31536000); } } Let me know if this helps. Alain ------------------------------------------------------------------------ [2006-02-02 12:23:41] [EMAIL PROTECTED] No, the files listed do not help to track it down. You can try to compile PHP with --disable-zend-memory-manager and see if valgrind can add some more info, but I suspect that there are no valgrind for your platform. Try to reproduce it on an Intel-based server and see if you can get more info with valgrind. But still a short reproduce code would be even more appreciated. ------------------------------------------------------------------------ [2006-02-02 11:04:29] alain dot russell at blackpepper dot co dot nz Ok .. I've spent a couple of hours summarising the page to see if I can supply code for you here and havent had much luck. Any idea what I should be looking for in the code ? Do the files listed help track down what I should be looking for ? /php-5.1.2/ext/standard/string.c(3006) /php-5.1.2/Zend/zend_alloc.c(237) /php-5.1.2/main/php_variables.c(186) Thanks Alain ------------------------------------------------------------------------ [2006-01-30 11:23:51] alain dot russell at blackpepper dot co dot nz Description: ------------ Since upgrading to 5.1.2 I am seeing a lot of memory leak errors. Reproduce code: --------------- n/a ? Expected result: ---------------- No memory leak warnings. Actual result: -------------- Example errors as follows: [Mon Jan 30 22:22:16 2006] Script: '/Library/WebServer/ Documents/cohesion/itcintl.co.nz/index.php' /Users/admin/Desktop/php-5.1.2/main/php_variables.c(186) : Freeing 0x005F6548 (16 bytes), script=/Library/WebServer/ Documents/cohesion/itcintl.co.nz/index.php Last leak repeated 2 times [Mon Jan 30 22:22:16 2006] Script: '/Library/WebServer/ Documents/cohesion/itcintl.co.nz/index.php' /Users/admin/Desktop/php-5.1.2/ext/standard/string.c(3006) : Freeing 0x005B1E28 (5 bytes), script=/Library/WebServer/ Documents/cohesion/itcintl.co.nz/index.php /Users/admin/Desktop/php-5.1.2/Zend/zend_alloc.c(237) : Actual location (location was relayed) Last leak repeated 2 times === Total 6 memory leaks detected === [Mon Jan 30 22:43:49 2006] Script: '/Library/WebServer/ Documents/blackpepper/sportzone.co.nz/index.php' /Users/admin/Desktop/php-5.1.2/ext/standard/string.c(3006) : Freeing 0x005D5448 (9 bytes), script=/Library/WebServer/ Documents/blackpepper/sportzone.co.nz/index.php /Users/admin/Desktop/php-5.1.2/Zend/zend_alloc.c(237) : Actual location (location was relayed) [Mon Jan 30 22:43:49 2006] Script: '/Library/WebServer/ Documents/blackpepper/sportzone.co.nz/index.php' /Users/admin/Desktop/php-5.1.2/main/php_variables.c(186) : Freeing 0x005F4798 (16 bytes), script=/Library/WebServer/ Documents/blackpepper/sportzone.co.nz/index.php === Total 2 memory leaks detected === [Mon Jan 30 22:44:07 2006] Script: '/Library/WebServer/ Documents/blackpepper/sportzone.co.nz/index.php' /Users/admin/Desktop/php-5.1.2/ext/standard/string.c(3006) : Freeing 0x005B1E28 (9 bytes), script=/Library/WebServer/ Documents/blackpepper/sportzone.co.nz/index.php /Users/admin/Desktop/php-5.1.2/Zend/zend_alloc.c(237) : Actual location (location was relayed) [Mon Jan 30 22:44:07 2006] Script: '/Library/WebServer/ Documents/blackpepper/sportzone.co.nz/index.php' /Users/admin/Desktop/php-5.1.2/main/php_variables.c(186) : Freeing 0x005EED98 (16 bytes), script=/Library/WebServer/ Documents/blackpepper/sportzone.co.nz/index.php === Total 2 memory leaks detected === ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36205&edit=1