ID: 21316 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Closed Bug Type: Scripting Engine problem Operating System: any PHP Version: 4CVS-2002-12-31 (dev) New Comment:
This bug has been fixed in CVS. In case this was a PHP problem, 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/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2002-12-31 14:59:17] [EMAIL PROTECTED] <?php function foo() { debug_print_backtrace(); } foo(); ?> After running the above script, the memory manager reports following leaks: /home/koizumi/src/php.net/HEAD/php4/Zend/zend_hash.c(178) : Freeing 0x0827FD54 (32 bytes), script=/tmp/test3.php /home/koizumi/src/php.net/HEAD/php4/Zend/zend_builtin_functions.c(1166) : Freei ng 0x0827FCF4 (44 bytes), script=/tmp/test3.php /home/koizumi/src/php.net/HEAD/php4/Zend/zend_API.c(565) : Actual location (loca tion was relayed) /home/koizumi/src/php.net/HEAD/php4/Zend/zend_builtin_functions.c(1165) : Freei ng 0x0827DD2C (12 bytes), script=/tmp/test3.php Suggested patch (I'm going to resend this later): Index: Zend/zend_builtin_functions.c =================================================================== RCS file: /repository/Zend/zend_builtin_functions.c,v retrieving revision 1.132 diff -u -r1.132 zend_builtin_functions.c --- Zend/zend_builtin_functions.c 31 Dec 2002 15:55:01 -0000 1.132 +++ Zend/zend_builtin_functions.c 31 Dec 2002 20:53:31 -0000 @@ -1310,7 +1310,7 @@ } zend_printf("%s(", function_name?function_name:"main"); debug_print_backtrace_args(arg_array); - ZVAL_DELREF(arg_array); + zval_ptr_dtor(&arg_array); zend_printf(") called at [%s:%d]\n", filename, lineno); include_filename = filename; ptr = ptr->prev_execute_data; ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21316&edit=1