com php-src: Always checks for exception before push call frame: Zend/zend_vm_def.h Zend/zend_vm_execute.h

From: Date: Tue, 28 Jul 2015 08:06:06 +0000
Subject: com php-src: Always checks for exception before push call frame: Zend/zend_vm_def.h Zend/zend_vm_execute.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-88197@lists.php.net to get a copy of this message
Commit: 5ac6b8bcc6431073e453d1eb19c347b24a03261c Author: Xinchen Hui <laruence@php.net> Tue, 28 Jul 2015 16:06:06 +0800 Parents: 4e9674f1a302fecdca6963a982c7b5d26f30cd65 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5ac6b8bcc6431073e453d1eb19c347b24a03261c Log: Always checks for exception before push call frame Changed paths: M Zend/zend_vm_def.h M Zend/zend_vm_execute.h Diff: diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 0d0eee1..f77e495 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -3209,6 +3209,9 @@ ZEND_VM_C_LABEL(try_function_name): zend_error(E_DEPRECATED, "Non-static method %s::%s() should not be called statically", ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name)); + if (UNEXPECTED(EG(exception) != NULL)) { + HANDLE_EXCEPTION(); + } } else { zend_throw_error( zend_ce_error, @@ -3300,6 +3303,9 @@ ZEND_VM_C_LABEL(try_function_name): zend_error(E_DEPRECATED, "Non-static method %s::%s() should not be called statically", ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name)); + if (UNEXPECTED(EG(exception) != NULL)) { + HANDLE_EXCEPTION(); + } } else { zend_throw_error( zend_ce_error, @@ -3390,6 +3396,9 @@ ZEND_VM_HANDLER(118, ZEND_INIT_USER_CALL, CONST, CONST|TMPVAR|CV) zend_error(E_DEPRECATED, "Non-static method %s::%s() should not be called statically", ZSTR_VAL(func->common.scope->name), ZSTR_VAL(func->common.function_name)); + if (UNEXPECTED(EG(exception) != NULL)) { + HANDLE_EXCEPTION(); + } } } else { zend_internal_type_error(EX_USES_STRICT_TYPES(), "%s() expects parameter 1 to be a valid callback, %s", Z_STRVAL_P(EX_CONSTANT(opline->op1)), error); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 36578da..950353c 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -1978,6 +1978,9 @@ try_function_name: zend_error(E_DEPRECATED, "Non-static method %s::%s() should not be called statically", ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name)); + if (UNEXPECTED(EG(exception) != NULL)) { + HANDLE_EXCEPTION(); + } } else { zend_throw_error( zend_ce_error, @@ -2069,6 +2072,9 @@ try_function_name: zend_error(E_DEPRECATED, "Non-static method %s::%s() should not be called statically", ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name)); + if (UNEXPECTED(EG(exception) != NULL)) { + HANDLE_EXCEPTION(); + } } else { zend_throw_error( zend_ce_error, @@ -2391,6 +2397,9 @@ try_function_name: zend_error(E_DEPRECATED, "Non-static method %s::%s() should not be called statically", ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name)); + if (UNEXPECTED(EG(exception) != NULL)) { + HANDLE_EXCEPTION(); + } } else { zend_throw_error( zend_ce_error, @@ -2482,6 +2491,9 @@ try_function_name: zend_error(E_DEPRECATED, "Non-static method %s::%s() should not be called statically", ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name)); + if (UNEXPECTED(EG(exception) != NULL)) { + HANDLE_EXCEPTION(); + } } else { zend_throw_error( zend_ce_error, @@ -2637,6 +2649,9 @@ try_function_name: zend_error(E_DEPRECATED, "Non-static method %s::%s() should not be called statically", ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name)); + if (UNEXPECTED(EG(exception) != NULL)) { + HANDLE_EXCEPTION(); + } } else { zend_throw_error( zend_ce_error, @@ -2728,6 +2743,9 @@ try_function_name: zend_error(E_DEPRECATED, "Non-static method %s::%s() should not be called statically", ZSTR_VAL(fbc->common.scope->name), ZSTR_VAL(fbc->common.function_name)); + if (UNEXPECTED(EG(exception) != NULL)) { + HANDLE_EXCEPTION(); + } } else { zend_throw_error( zend_ce_error, @@ -5725,6 +5743,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_CONS zend_error(E_DEPRECATED, "Non-static method %s::%s() should not be called statically", ZSTR_VAL(func->common.scope->name), ZSTR_VAL(func->common.function_name)); + if (UNEXPECTED(EG(exception) != NULL)) { + HANDLE_EXCEPTION(); + } } } else { zend_internal_type_error(EX_USES_STRICT_TYPES(), "%s() expects parameter 1 to be a valid callback, %s", Z_STRVAL_P(EX_CONSTANT(opline->op1)), error); @@ -9472,6 +9493,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_CV_H zend_error(E_DEPRECATED, "Non-static method %s::%s() should not be called statically", ZSTR_VAL(func->common.scope->name), ZSTR_VAL(func->common.function_name)); + if (UNEXPECTED(EG(exception) != NULL)) { + HANDLE_EXCEPTION(); + } } } else { zend_internal_type_error(EX_USES_STRICT_TYPES(), "%s() expects parameter 1 to be a valid callback, %s", Z_STRVAL_P(EX_CONSTANT(opline->op1)), error); @@ -11279,6 +11303,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_TMPV zend_error(E_DEPRECATED, "Non-static method %s::%s() should not be called statically", ZSTR_VAL(func->common.scope->name), ZSTR_VAL(func->common.function_name)); + if (UNEXPECTED(EG(exception) != NULL)) { + HANDLE_EXCEPTION(); + } } } else { zend_internal_type_error(EX_USES_STRICT_TYPES(), "%s() expects parameter 1 to be a valid callback, %s", Z_STRVAL_P(EX_CONSTANT(opline->op1)), error);

« previous php.cvs (#88197) next »