cvs: ZendEngine2 / zend.c zend_execute_API.c

From: Date: Wed, 11 Feb 2004 12:31:19 +0000
Subject: cvs: ZendEngine2 / zend.c zend_execute_API.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-2351@lists.php.net to get a copy of this message
zeev Wed Feb 11 07:31:19 2004 EDT Modified files: /ZendEngine2 zend.c zend_execute_API.c Log: Fix exceptions thrown without a stack frame Always enable set_exception_handler() http://cvs.php.net/diff.php/ZendEngine2/zend.c?r1=1.265&r2=1.266&ty=u Index: ZendEngine2/zend.c diff -u ZendEngine2/zend.c:1.265 ZendEngine2/zend.c:1.266 --- ZendEngine2/zend.c:1.265 Thu Jan 15 11:47:32 2004 +++ ZendEngine2/zend.c Wed Feb 11 07:31:18 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend.c,v 1.265 2004/01/15 16:47:32 zeev Exp $ */ +/* $Id: zend.c,v 1.266 2004/02/11 12:31:18 zeev Exp $ */ #include "zend.h" #include "zend_extensions.h" @@ -1057,7 +1057,6 @@ } else { strcpy(ex_class_name, "Unknown Exception"); } -#if 1 /* support set_exception_handler() */ if (EG(user_exception_handler)) { zval *orig_user_exception_handler; zval ***params, *retval2, *old_exception; @@ -1090,11 +1089,6 @@ zval_ptr_dtor(EG(return_value_ptr_ptr)); local_retval = NULL; } -#else - zend_exception_error(EG(exception) TSRMLS_CC); - zval_ptr_dtor(&EG(exception)); - EG(exception) = NULL; -#endif } else if (!retval) { zval_ptr_dtor(EG(return_value_ptr_ptr)); local_retval = NULL; http://cvs.php.net/diff.php/ZendEngine2/zend_execute_API.c?r1=1.265&r2=1.266&ty=u Index: ZendEngine2/zend_execute_API.c diff -u ZendEngine2/zend_execute_API.c:1.265 ZendEngine2/zend_execute_API.c:1.266 --- ZendEngine2/zend_execute_API.c:1.265 Wed Feb 11 04:42:58 2004 +++ ZendEngine2/zend_execute_API.c Wed Feb 11 07:31:18 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_execute_API.c,v 1.265 2004/02/11 09:42:58 zeev Exp $ */ +/* $Id: zend_execute_API.c,v 1.266 2004/02/11 12:31:18 zeev Exp $ */ #include <stdio.h> #include <signal.h> @@ -1200,6 +1200,10 @@ } EG(exception) = exception; } + if (!EG(current_execute_data)) { + zend_error(E_ERROR, "Exception thrown without a stack frame"); + } + if ((EG(current_execute_data)->opline+1)->opcode == ZEND_HANDLE_EXCEPTION) { /* no need to rethrow the exception */ return;

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