Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_execute_API.c
| From: | Jani Taskinen | Date: | Thu, 11 Dec 2003 23:12:40 +0000 |
| Subject: | Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_execute_API.c | ||
| References: | 1 | Groups: | php.zend-engine.cvs |
| Request: | Send a blank email to php-zend-engine-cvs+get-2098@lists.php.net to get a copy of this message | ||
Where's the NEWS entry?
--Jani
On Thu, 11 Dec 2003, Marcus Boerger wrote:
>helly Thu Dec 11 13:18:52 2003 EDT
>
> Modified files:
> /ZendEngine2 zend_execute_API.c
> Log:
> Bugfix: #26591 [NEW]: "__autoload threw an exception" during an uncaught
> Exception
>
>
>Index: ZendEngine2/zend_execute_API.c
>diff -u ZendEngine2/zend_execute_API.c:1.242 ZendEngine2/zend_execute_API.c:1.243
>--- ZendEngine2/zend_execute_API.c:1.242 Wed Dec 10 05:24:35 2003
>+++ ZendEngine2/zend_execute_API.c Thu Dec 11 13:18:52 2003
>@@ -17,7 +17,7 @@
> +----------------------------------------------------------------------+
> */
>
>-/* $Id: zend_execute_API.c,v 1.242 2003/12/10 10:24:35 helly Exp $ */
>+/* $Id: zend_execute_API.c,v 1.243 2003/12/11 18:18:52 helly Exp $ */
>
> #include <stdio.h>
> #include <signal.h>
>@@ -781,6 +781,7 @@
> zval *retval_ptr;
> int retval;
> char *lc_name;
>+ zval *exception;
>
> lc_name = do_alloca(name_length + 1);
> zend_str_tolower_copy(lc_name, name, name_length+1);
>@@ -797,17 +798,22 @@
>
> args[0] = &class_name_ptr;
>
>+ exception = EG(exception);
>+ EG(exception) = NULL;
> retval = call_user_function_ex(EG(function_table), NULL, &autoload_function,
> &retval_ptr, 1, args, 0, NULL TSRMLS_CC);
>
> if (retval == FAILURE) {
>+ EG(exception) = exception;
> free_alloca(lc_name);
> return FAILURE;
> }
>
> if (EG(exception)) {
> free_alloca(lc_name);
>- zend_error(E_ERROR, "__autoload threw an exception");
>+ zend_error(E_ERROR, "__autoload(%s) threw an exception of type '%s'",
>name, Z_OBJCE_P(EG(exception))->name);
>+ return FAILURE;
> }
>+ EG(exception) = exception;
>
> /* If an exception is thrown retval_ptr will be NULL but we bailout before we reach this point
> */
> zval_ptr_dtor(&retval_ptr);
>
>