]> granicus.if.org Git - php/commitdiff
Fixed bug #71485 (Return typehint on interanal func causes Fatal error when it throws...
authorXinchen Hui <laruence@gmail.com>
Sat, 30 Jan 2016 06:05:52 +0000 (22:05 -0800)
committerXinchen Hui <laruence@gmail.com>
Sat, 30 Jan 2016 06:05:52 +0000 (22:05 -0800)
NEWS
Zend/zend_vm_def.h
Zend/zend_vm_execute.h

diff --git a/NEWS b/NEWS
index 99d3158ccc4f7c20164a1ac7862e2d9f43b28673..9339caacaf9eb97699c9bb8c8cc8b3e8815fea6f 100644 (file)
--- 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)
index 5748fa86eefa49389498e1ea711b231ab2bff55b..11cd2416bf0203745c4b13f3195ac423d2bc8d28 100644 (file)
@@ -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
index 3be9edd1614ea023346e8486570e896c8424c0f2..6f4406967c0917ceb2e4e44e1694ecd865558990 100644 (file)
@@ -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