diff options
author | Dmitry Stogov <dmitry@php.net> | 2007-11-20 09:51:12 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2007-11-20 09:51:12 +0000 |
commit | c3ab6bd09164bd17f9dab09da47a045247210e34 (patch) | |
tree | ecd302f2b2e96d4286f6304ef56a9d3c68bc7749 /ext | |
parent | 9f230a0d794e13fce699df9fd1187b55ff83bc35 (diff) | |
download | php-git-c3ab6bd09164bd17f9dab09da47a045247210e34.tar.gz |
Fixed bug #43136 (possible crash on script execution timeout. The EG(function_state_ptr) is completely removed, EG(current_execute_data)->function_state must be used instead)
Diffstat (limited to 'ext')
-rw-r--r-- | ext/com_dotnet/com_com.c | 2 | ||||
-rw-r--r-- | ext/com_dotnet/com_handlers.c | 2 | ||||
-rwxr-xr-x | ext/spl/php_spl.c | 3 |
3 files changed, 2 insertions, 5 deletions
diff --git a/ext/com_dotnet/com_com.c b/ext/com_dotnet/com_com.c index 60bccd96bb..cf6cf8d283 100644 --- a/ext/com_dotnet/com_com.c +++ b/ext/com_dotnet/com_com.c @@ -469,7 +469,7 @@ int php_com_do_invoke_byref(php_com_dotnet_object *obj, char *name, int namelen, HRESULT hr; VARIANT *vargs = NULL, *byref_vals = NULL; int i, byref_count = 0, j; - zend_internal_function *f = (zend_internal_function*)EG(function_state_ptr)->function; + zend_internal_function *f = (zend_internal_function*)EG(current_execute_data)->function_state.function; /* assumption: that the active function (f) is the function we generated for the engine */ if (!f || f->arg_info == NULL) { diff --git a/ext/com_dotnet/com_handlers.c b/ext/com_dotnet/com_handlers.c index 113e8b02f4..3bb5756977 100644 --- a/ext/com_dotnet/com_handlers.c +++ b/ext/com_dotnet/com_handlers.c @@ -255,7 +255,7 @@ static void function_dtor(void *pDest) static PHP_FUNCTION(com_method_handler) { Z_OBJ_HANDLER_P(getThis(), call_method)( - ((zend_internal_function*)EG(function_state_ptr)->function)->function_name, + ((zend_internal_function*)EG(current_execute_data)->function_state.function)->function_name, INTERNAL_FUNCTION_PARAM_PASSTHRU); } diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c index b4cd28144b..a9e6c96c5d 100755 --- a/ext/spl/php_spl.c +++ b/ext/spl/php_spl.c @@ -267,7 +267,6 @@ PHP_FUNCTION(spl_autoload) zval **original_return_value = EG(return_value_ptr_ptr); zend_op **original_opline_ptr = EG(opline_ptr); zend_op_array *original_active_op_array = EG(active_op_array); - zend_function_state *original_function_state_ptr = EG(function_state_ptr); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s", &class_name, &class_name_len, &file_exts, &file_exts_len) == FAILURE) { RETURN_FALSE; @@ -283,7 +282,6 @@ PHP_FUNCTION(spl_autoload) EG(return_value_ptr_ptr) = original_return_value; EG(opline_ptr) = original_opline_ptr; EG(active_op_array) = original_active_op_array; - EG(function_state_ptr) = original_function_state_ptr; pos2 = strchr(pos1, ','); if (pos2) *pos2 = '\0'; if (spl_autoload(class_name, lc_name, class_name_len, pos1 TSRMLS_CC)) { @@ -300,7 +298,6 @@ PHP_FUNCTION(spl_autoload) EG(return_value_ptr_ptr) = original_return_value; EG(opline_ptr) = original_opline_ptr; EG(active_op_array) = original_active_op_array; - EG(function_state_ptr) = original_function_state_ptr; if (!found && !SPL_G(autoload_running)) { /* For internal errors, we generate E_ERROR, for direct calls an exception is thrown. |