From: Xinchen Hui Date: Sat, 30 Jan 2016 06:05:52 +0000 (-0800) Subject: Fixed bug #71485 (Return typehint on interanal func causes Fatal error when it throws... X-Git-Tag: php-7.1.0alpha2~54^2~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e0627594011364e6d75d86a87c6c3a9219e704d1;p=php Fixed bug #71485 (Return typehint on interanal func causes Fatal error when it throws exception). --- diff --git a/NEWS b/NEWS index 99d3158ccc..9339caacaf 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,8 @@ PHP NEWS ?? ??? 2016 PHP 7.0.4 - Core: + . Fixed bug #71485 (Return typehint on interanal func causes Fatal error + when it throws exception). (Laruence) . Fixed bug #71474 (Crash because of VM stack corruption on Magento2). (Dmitry) . Fixed bug #71450 (An integer overflow bug in php_str_to_str_ex()). (Stas) diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 5748fa86ee..11cd2416bf 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -3527,7 +3527,7 @@ ZEND_VM_HANDLER(129, ZEND_DO_ICALL, ANY, ANY) #if ZEND_DEBUG ZEND_ASSERT( - !call->func || + EG(exception) || !call->func || !(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) || zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var))); #endif @@ -3655,7 +3655,7 @@ ZEND_VM_HANDLER(131, ZEND_DO_FCALL_BY_NAME, ANY, ANY) #if ZEND_DEBUG ZEND_ASSERT( - !call->func || + EG(exception) || !call->func || !(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) || zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var))); #endif @@ -3786,7 +3786,7 @@ ZEND_VM_HANDLER(60, ZEND_DO_FCALL, ANY, ANY) #if ZEND_DEBUG ZEND_ASSERT( - !call->func || + EG(exception) || !call->func || !(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) || zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var))); #endif @@ -7925,7 +7925,7 @@ ZEND_VM_HANDLER(158, ZEND_CALL_TRAMPOLINE, ANY, ANY) #if ZEND_DEBUG ZEND_ASSERT( - !call->func || + EG(exception) || !call->func || !(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) || zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var))); #endif diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 3be9edd161..6f4406967c 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -587,7 +587,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_ICALL_SPEC_HANDLER(ZEND_OPC #if ZEND_DEBUG ZEND_ASSERT( - !call->func || + EG(exception) || !call->func || !(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) || zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var))); #endif @@ -715,7 +715,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER( #if ZEND_DEBUG ZEND_ASSERT( - !call->func || + EG(exception) || !call->func || !(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) || zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var))); #endif @@ -846,7 +846,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_SPEC_HANDLER(ZEND_OPC #if ZEND_DEBUG ZEND_ASSERT( - !call->func || + EG(exception) || !call->func || !(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) || zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var))); #endif @@ -1813,7 +1813,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CALL_TRAMPOLINE_SPEC_HANDLER(Z #if ZEND_DEBUG ZEND_ASSERT( - !call->func || + EG(exception) || !call->func || !(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) || zend_verify_internal_return_type(call->func, EX_VAR(opline->result.var))); #endif