cvs: ZendEngine2 / zend_compile.c zend_execute_API.c

From: Date: Thu, 24 Nov 2005 11:32:47 +0000
Subject: cvs: ZendEngine2 / zend_compile.c zend_execute_API.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-4388@lists.php.net to get a copy of this message
dmitry Thu Nov 24 06:32:47 2005 EDT Modified files: /ZendEngine2 zend_compile.c zend_execute_API.c Log: Fixed bug #35360 (exceptions in interactive mode (php -a) may cause crash) http://cvs.php.net/diff.php/ZendEngine2/zend_compile.c?r1=1.673&r2=1.674&ty=u Index: ZendEngine2/zend_compile.c diff -u ZendEngine2/zend_compile.c:1.673 ZendEngine2/zend_compile.c:1.674 --- ZendEngine2/zend_compile.c:1.673 Wed Nov 23 04:27:00 2005 +++ ZendEngine2/zend_compile.c Thu Nov 24 06:32:43 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.c,v 1.673 2005/11/23 09:27:00 dmitry Exp $ */ +/* $Id: zend_compile.c,v 1.674 2005/11/24 11:32:43 dmitry Exp $ */ #include <zend_language_parser.h> #include "zend.h" @@ -1827,12 +1827,14 @@ } else { CG(active_op_array)->opcodes[last_additional_catch->u.opline_num].op1.u.EA.type = 1; } + DEC_BPC(CG(active_op_array)); } void zend_do_try(znode *try_token TSRMLS_DC) { try_token->u.opline_num = zend_add_try_element(get_next_op_number(CG(active_op_array)) TSRMLS_CC); + INC_BPC(CG(active_op_array)); } http://cvs.php.net/diff.php/ZendEngine2/zend_execute_API.c?r1=1.343&r2=1.344&ty=u Index: ZendEngine2/zend_execute_API.c diff -u ZendEngine2/zend_execute_API.c:1.343 ZendEngine2/zend_execute_API.c:1.344 --- ZendEngine2/zend_execute_API.c:1.343 Thu Oct 27 15:25:01 2005 +++ ZendEngine2/zend_execute_API.c Thu Nov 24 06:32:44 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_execute_API.c,v 1.343 2005/10/27 19:25:01 dmitry Exp $ */ +/* $Id: zend_execute_API.c,v 1.344 2005/11/24 11:32:44 dmitry Exp $ */ #include <stdio.h> #include <signal.h> @@ -1217,6 +1217,8 @@ INIT_ZVAL(ret_opline->op1.u.constant); SET_UNUSED(ret_opline->op2); + zend_do_handle_exception(TSRMLS_C); + if (!CG(active_op_array)->start_op) { CG(active_op_array)->start_op = CG(active_op_array)->opcodes; } @@ -1254,8 +1256,12 @@ if (local_retval) { zval_ptr_dtor(&local_retval); } + + if (EG(exception)) { + zend_exception_error(EG(exception) TSRMLS_CC); + } - CG(active_op_array)->last--; /* get rid of that ZEND_RETURN */ + CG(active_op_array)->last -= 2; /* get rid of that ZEND_RETURN and ZEND_HANDLE_EXCEPTION */ CG(active_op_array)->start_op = CG(active_op_array)->opcodes+CG(active_op_array)->last; }

« previous php.zend-engine.cvs (#4388) next »