Code Comments
Programming Forum and web based access to our favorite programming groups.dmitry Tue Feb 19 16:39:04 2008 UTC Modified files: (Branch: PHP_5_2) /ZendEngine2 zend_builtin_functions.c zend_vm_execute.h Log: Fixed memory leaks http://cvs.php.net/viewvc.cgi/ZendE...8&diff_format=u Index: ZendEngine2/zend_builtin_functions.c diff -u ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.27 ZendEngine2/zen d_builtin_functions.c:1.277.2.12.2.28 --- ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.27 Fri Feb 15 07:44:45 2008 +++ ZendEngine2/zend_builtin_functions.c Tue Feb 19 16:39:02 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_builtin_functions.c,v 1.277.2.12.2.27 2008/02/15 07:44:45 dmit ry Exp $ */ +/* $Id: zend_builtin_functions.c,v 1.277.2.12.2.28 2008/02/19 16:39:02 dmit ry Exp $ */ #include "zend.h" #include "zend_API.h" @@ -1218,6 +1218,7 @@ had_orig_error_handler = 1; *return_value = *EG(user_error_handler); zval_copy_ctor(return_value); + INIT_PZVAL(return_value); zend_stack_push(& EG(user_error_handlers_error_reporting), &EG(user_error_han dler_error_reporting), sizeof(EG(user_error_handler_error_repor ting))); zend_ptr_stack_push(&EG(user_error_handlers), EG(user_error_handler)); } @@ -1232,6 +1233,7 @@ EG(user_error_handler_error_reporting) = (int)error_type; *EG(user_error_handler) = *error_handler; zval_copy_ctor(EG(user_error_handler)); + INIT_PZVAL(EG(user_error_handler)); if (!had_orig_error_handler) { RETURN_NULL(); http://cvs.php.net/viewvc.cgi/ZendE...6&diff_format=u Index: ZendEngine2/zend_vm_execute.h diff -u ZendEngine2/zend_vm_execute.h:1.62.2.30.2.55 ZendEngine2/zend_vm_exe cute.h:1.62.2.30.2.56 --- ZendEngine2/zend_vm_execute.h:1.62.2.30.2.55 Mon Dec 31 07:20:03 2007 +++ ZendEngine2/zend_vm_execute.h Tue Feb 19 16:39:02 2008 @@ -181,6 +181,13 @@ ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr); INIT_ZVAL(*(EX_T(opline->result.u.var).var.ptr)); +if (strcmp(EX(function_state).function->common.function_name, "set_error_ha ndler") == 0) { +static n = 0; +++n; +if (n>=542) { +fprintf(stderr, "%3d 0x%08X %s\n", n, EX_T(opline->result.u.var).var.ptr, E X(function_state).function->common.function_name); +} +} if (EX(function_state).function->common.arg_info) { zend_uint i=0;
Post Follow-up to this messagePaula Abdul on couch tugging! http://www.CheapVideoBlog.com/PlayM...eg?watch=726071
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.