ID: 49711 Updated by: j...@php.net Reported By: kristina at 10gen dot com -Status: Open +Status: Feedback -Bug Type: Unknown/Other Function +Bug Type: Scripting Engine problem Operating System: Windows PHP Version: 5.3.0 New Comment:
Please try using this snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: ------------------------------------------------------------------------ [2009-09-29 14:49:57] kristina at 10gen dot com Description: ------------ A method with the ZEND_ACC_DEPRECATED flag will cause memory usage to increase each time it's called through PHPUnit. (It doesn't occur with a PHP program run with "php script.php", so it might have something to do with reflection.) It occurs in 5.2.* and 5.3.*, only on Windows. I've written a small PHP extension that demonstrates this bug. It is available at http://github.com/beaddy1238/PHP-Memleak. Reproduce code: --------------- Compile the extension by putting the config.w32, php_mongo.h, and mongo.c files in a pecl\mongo dir. >From the pecl\mongo directory, run: phpunit tests\MongoRunner.php It print out the memory used at the beginning and end of the function. The function calls Mongo->lastError() (an empty method) 10000 times. Expected result: ---------------- I expect the memory usage to stay the same. Actual result: -------------- The more times Mongo->lastError is called, the more memory is used. This stops happening if ZEND_ACC_DEPRECATED is removed from mongo.c. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=49711&edit=1