]> granicus.if.org Git - php/commitdiff
Don't write prop if read prop threw exception
authorNikita Popov <nikic@php.net>
Sun, 17 May 2015 11:46:54 +0000 (13:46 +0200)
committerNikita Popov <nikic@php.net>
Sun, 17 May 2015 11:46:54 +0000 (13:46 +0200)
Zend/tests/closure_038.phpt
Zend/tests/closure_039.phpt
Zend/tests/exception_during_property_assign_op.phpt [new file with mode: 0644]
Zend/zend_vm_def.h
Zend/zend_vm_execute.h

index b1e940687295b3f756b9179b72bb1c07f7ada7a0..61fcc1cb9460b8a7f5b220c9f90c6eb328ad6c9d 100644 (file)
@@ -60,11 +60,6 @@ Stack trace:
 #0 %s(%d): Closure->{closure}()
 #1 {main}
 
-Next exception 'EngineException' with message 'Cannot access private property B::$x' in %s:%d
-Stack trace:
-#0 %s(%d): Closure->{closure}()
-#1 {main}
-
 Next exception 'EngineException' with message 'Cannot access private property B::$x' in %s:%d
 Stack trace:
 #0 %s(%d): Closure->{closure}()
index 9e5ecbd21bfa08647273de5c62e413e5a529f3a4..ecdf9be080208089390b1c336dcc2571c4f26cbd 100644 (file)
@@ -60,11 +60,6 @@ Stack trace:
 #0 %s(%d): Closure->{closure}()
 #1 {main}
 
-Next exception 'EngineException' with message 'Cannot access private property B::$x' in %s:%d
-Stack trace:
-#0 %s(%d): Closure->{closure}()
-#1 {main}
-
 Next exception 'EngineException' with message 'Cannot access private property B::$x' in %s:%d
 Stack trace:
 #0 %s(%d): Closure->{closure}()
diff --git a/Zend/tests/exception_during_property_assign_op.phpt b/Zend/tests/exception_during_property_assign_op.phpt
new file mode 100644 (file)
index 0000000..0c4c5d0
--- /dev/null
@@ -0,0 +1,21 @@
+--TEST--
+Exception during read part of compound assignment operation on a property
+--FILE--
+<?php
+
+class Test {
+    public function __get($name) {
+        throw new Exception;
+    }
+}
+
+$test = new Test;
+try {
+    $test->prop += 42;
+} catch (Exception $e) {}
+var_dump($test);
+
+?>
+--EXPECT--
+object(Test)#1 (0) {
+}
index c1f855809c206fab99da4245dc09ecbb27395c3a..c8626f185bedd13b0061094f9a7c2787c351da9f 100644 (file)
@@ -715,6 +715,10 @@ ZEND_VM_HELPER_EX(zend_binary_assign_op_obj_helper, VAR|UNUSED|CV, CONST|TMPVAR|
                        Z_ADDREF(obj);
                        if (Z_OBJ_HT(obj)->read_property &&
                                (z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, ((OP2_TYPE == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), &rv)) != NULL) {
+                               if (UNEXPECTED(EG(exception))) {
+                                       OBJ_RELEASE(Z_OBJ(obj));
+                                       break;
+                               }
                                if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
                                        zval rv2;
                                        zval *value = Z_OBJ_HT_P(z)->get(z, &rv2);
@@ -1146,6 +1150,10 @@ ZEND_VM_HELPER_EX(zend_pre_incdec_property_helper, VAR|UNUSED|CV, CONST|TMPVAR|C
                                ZVAL_OBJ(&obj, Z_OBJ_P(object));
                                Z_ADDREF(obj);
                                z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, ((OP2_TYPE == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), &rv);
+                               if (UNEXPECTED(EG(exception))) {
+                                       OBJ_RELEASE(Z_OBJ(obj));
+                                       break;
+                               }
 
                                if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
                                        zval rv2;
@@ -1244,6 +1252,10 @@ ZEND_VM_HELPER_EX(zend_post_incdec_property_helper, VAR|UNUSED|CV, CONST|TMPVAR|
                                ZVAL_OBJ(&obj, Z_OBJ_P(object));
                                Z_ADDREF(obj);
                                z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, ((OP2_TYPE == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), &rv);
+                               if (UNEXPECTED(EG(exception))) {
+                                       OBJ_RELEASE(Z_OBJ(obj));
+                                       break;
+                               }
 
                                if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
                                        zval rv2;
index 6b7f91b8d7b3f7fbe27f2002be3d9b55c4e1cd23..5ee528e75914046886fd3d5432f9b179eff87c80 100644 (file)
@@ -16366,6 +16366,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
                        Z_ADDREF(obj);
                        if (Z_OBJ_HT(obj)->read_property &&
                                (z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), &rv)) != NULL) {
+                               if (UNEXPECTED(EG(exception))) {
+                                       OBJ_RELEASE(Z_OBJ(obj));
+                                       break;
+                               }
                                if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
                                        zval rv2;
                                        zval *value = Z_OBJ_HT_P(z)->get(z, &rv2);
@@ -16795,6 +16799,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
                                ZVAL_OBJ(&obj, Z_OBJ_P(object));
                                Z_ADDREF(obj);
                                z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), &rv);
+                               if (UNEXPECTED(EG(exception))) {
+                                       OBJ_RELEASE(Z_OBJ(obj));
+                                       break;
+                               }
 
                                if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
                                        zval rv2;
@@ -16892,6 +16900,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
                                ZVAL_OBJ(&obj, Z_OBJ_P(object));
                                Z_ADDREF(obj);
                                z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), &rv);
+                               if (UNEXPECTED(EG(exception))) {
+                                       OBJ_RELEASE(Z_OBJ(obj));
+                                       break;
+                               }
 
                                if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
                                        zval rv2;
@@ -19608,6 +19620,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
                        Z_ADDREF(obj);
                        if (Z_OBJ_HT(obj)->read_property &&
                                (z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), &rv)) != NULL) {
+                               if (UNEXPECTED(EG(exception))) {
+                                       OBJ_RELEASE(Z_OBJ(obj));
+                                       break;
+                               }
                                if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
                                        zval rv2;
                                        zval *value = Z_OBJ_HT_P(z)->get(z, &rv2);
@@ -20037,6 +20053,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
                                ZVAL_OBJ(&obj, Z_OBJ_P(object));
                                Z_ADDREF(obj);
                                z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), &rv);
+                               if (UNEXPECTED(EG(exception))) {
+                                       OBJ_RELEASE(Z_OBJ(obj));
+                                       break;
+                               }
 
                                if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
                                        zval rv2;
@@ -20134,6 +20154,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
                                ZVAL_OBJ(&obj, Z_OBJ_P(object));
                                Z_ADDREF(obj);
                                z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), &rv);
+                               if (UNEXPECTED(EG(exception))) {
+                                       OBJ_RELEASE(Z_OBJ(obj));
+                                       break;
+                               }
 
                                if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
                                        zval rv2;
@@ -21338,6 +21362,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
                        Z_ADDREF(obj);
                        if (Z_OBJ_HT(obj)->read_property &&
                                (z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), &rv)) != NULL) {
+                               if (UNEXPECTED(EG(exception))) {
+                                       OBJ_RELEASE(Z_OBJ(obj));
+                                       break;
+                               }
                                if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
                                        zval rv2;
                                        zval *value = Z_OBJ_HT_P(z)->get(z, &rv2);
@@ -21769,6 +21797,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
                                ZVAL_OBJ(&obj, Z_OBJ_P(object));
                                Z_ADDREF(obj);
                                z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), &rv);
+                               if (UNEXPECTED(EG(exception))) {
+                                       OBJ_RELEASE(Z_OBJ(obj));
+                                       break;
+                               }
 
                                if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
                                        zval rv2;
@@ -21867,6 +21899,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
                                ZVAL_OBJ(&obj, Z_OBJ_P(object));
                                Z_ADDREF(obj);
                                z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), &rv);
+                               if (UNEXPECTED(EG(exception))) {
+                                       OBJ_RELEASE(Z_OBJ(obj));
+                                       break;
+                               }
 
                                if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
                                        zval rv2;
@@ -22954,6 +22990,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
                        Z_ADDREF(obj);
                        if (Z_OBJ_HT(obj)->read_property &&
                                (z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), &rv)) != NULL) {
+                               if (UNEXPECTED(EG(exception))) {
+                                       OBJ_RELEASE(Z_OBJ(obj));
+                                       break;
+                               }
                                if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
                                        zval rv2;
                                        zval *value = Z_OBJ_HT_P(z)->get(z, &rv2);
@@ -23345,6 +23385,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
                                ZVAL_OBJ(&obj, Z_OBJ_P(object));
                                Z_ADDREF(obj);
                                z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), &rv);
+                               if (UNEXPECTED(EG(exception))) {
+                                       OBJ_RELEASE(Z_OBJ(obj));
+                                       break;
+                               }
 
                                if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
                                        zval rv2;
@@ -23442,6 +23486,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
                                ZVAL_OBJ(&obj, Z_OBJ_P(object));
                                Z_ADDREF(obj);
                                z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), &rv);
+                               if (UNEXPECTED(EG(exception))) {
+                                       OBJ_RELEASE(Z_OBJ(obj));
+                                       break;
+                               }
 
                                if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
                                        zval rv2;
@@ -25355,6 +25403,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
                        Z_ADDREF(obj);
                        if (Z_OBJ_HT(obj)->read_property &&
                                (z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), &rv)) != NULL) {
+                               if (UNEXPECTED(EG(exception))) {
+                                       OBJ_RELEASE(Z_OBJ(obj));
+                                       break;
+                               }
                                if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
                                        zval rv2;
                                        zval *value = Z_OBJ_HT_P(z)->get(z, &rv2);
@@ -25746,6 +25798,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
                                ZVAL_OBJ(&obj, Z_OBJ_P(object));
                                Z_ADDREF(obj);
                                z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), &rv);
+                               if (UNEXPECTED(EG(exception))) {
+                                       OBJ_RELEASE(Z_OBJ(obj));
+                                       break;
+                               }
 
                                if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
                                        zval rv2;
@@ -25843,6 +25899,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
                                ZVAL_OBJ(&obj, Z_OBJ_P(object));
                                Z_ADDREF(obj);
                                z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), &rv);
+                               if (UNEXPECTED(EG(exception))) {
+                                       OBJ_RELEASE(Z_OBJ(obj));
+                                       break;
+                               }
 
                                if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
                                        zval rv2;
@@ -26873,6 +26933,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
                        Z_ADDREF(obj);
                        if (Z_OBJ_HT(obj)->read_property &&
                                (z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), &rv)) != NULL) {
+                               if (UNEXPECTED(EG(exception))) {
+                                       OBJ_RELEASE(Z_OBJ(obj));
+                                       break;
+                               }
                                if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
                                        zval rv2;
                                        zval *value = Z_OBJ_HT_P(z)->get(z, &rv2);
@@ -27265,6 +27329,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
                                ZVAL_OBJ(&obj, Z_OBJ_P(object));
                                Z_ADDREF(obj);
                                z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), &rv);
+                               if (UNEXPECTED(EG(exception))) {
+                                       OBJ_RELEASE(Z_OBJ(obj));
+                                       break;
+                               }
 
                                if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
                                        zval rv2;
@@ -27363,6 +27431,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
                                ZVAL_OBJ(&obj, Z_OBJ_P(object));
                                Z_ADDREF(obj);
                                z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), &rv);
+                               if (UNEXPECTED(EG(exception))) {
+                                       OBJ_RELEASE(Z_OBJ(obj));
+                                       break;
+                               }
 
                                if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
                                        zval rv2;
@@ -30607,6 +30679,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
                        Z_ADDREF(obj);
                        if (Z_OBJ_HT(obj)->read_property &&
                                (z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), &rv)) != NULL) {
+                               if (UNEXPECTED(EG(exception))) {
+                                       OBJ_RELEASE(Z_OBJ(obj));
+                                       break;
+                               }
                                if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
                                        zval rv2;
                                        zval *value = Z_OBJ_HT_P(z)->get(z, &rv2);
@@ -31036,6 +31112,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
                                ZVAL_OBJ(&obj, Z_OBJ_P(object));
                                Z_ADDREF(obj);
                                z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), &rv);
+                               if (UNEXPECTED(EG(exception))) {
+                                       OBJ_RELEASE(Z_OBJ(obj));
+                                       break;
+                               }
 
                                if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
                                        zval rv2;
@@ -31133,6 +31213,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
                                ZVAL_OBJ(&obj, Z_OBJ_P(object));
                                Z_ADDREF(obj);
                                z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, ((IS_CONST == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), &rv);
+                               if (UNEXPECTED(EG(exception))) {
+                                       OBJ_RELEASE(Z_OBJ(obj));
+                                       break;
+                               }
 
                                if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
                                        zval rv2;
@@ -35839,6 +35923,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
                        Z_ADDREF(obj);
                        if (Z_OBJ_HT(obj)->read_property &&
                                (z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), &rv)) != NULL) {
+                               if (UNEXPECTED(EG(exception))) {
+                                       OBJ_RELEASE(Z_OBJ(obj));
+                                       break;
+                               }
                                if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
                                        zval rv2;
                                        zval *value = Z_OBJ_HT_P(z)->get(z, &rv2);
@@ -36268,6 +36356,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
                                ZVAL_OBJ(&obj, Z_OBJ_P(object));
                                Z_ADDREF(obj);
                                z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), &rv);
+                               if (UNEXPECTED(EG(exception))) {
+                                       OBJ_RELEASE(Z_OBJ(obj));
+                                       break;
+                               }
 
                                if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
                                        zval rv2;
@@ -36365,6 +36457,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
                                ZVAL_OBJ(&obj, Z_OBJ_P(object));
                                Z_ADDREF(obj);
                                z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, ((IS_CV == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), &rv);
+                               if (UNEXPECTED(EG(exception))) {
+                                       OBJ_RELEASE(Z_OBJ(obj));
+                                       break;
+                               }
 
                                if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
                                        zval rv2;
@@ -38492,6 +38588,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_binary_assign_op_obj_helper_SP
                        Z_ADDREF(obj);
                        if (Z_OBJ_HT(obj)->read_property &&
                                (z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), &rv)) != NULL) {
+                               if (UNEXPECTED(EG(exception))) {
+                                       OBJ_RELEASE(Z_OBJ(obj));
+                                       break;
+                               }
                                if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
                                        zval rv2;
                                        zval *value = Z_OBJ_HT_P(z)->get(z, &rv2);
@@ -38923,6 +39023,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_incdec_property_helper_SPE
                                ZVAL_OBJ(&obj, Z_OBJ_P(object));
                                Z_ADDREF(obj);
                                z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), &rv);
+                               if (UNEXPECTED(EG(exception))) {
+                                       OBJ_RELEASE(Z_OBJ(obj));
+                                       break;
+                               }
 
                                if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
                                        zval rv2;
@@ -39021,6 +39125,10 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_post_incdec_property_helper_SP
                                ZVAL_OBJ(&obj, Z_OBJ_P(object));
                                Z_ADDREF(obj);
                                z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, (((IS_TMP_VAR|IS_VAR) == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL), &rv);
+                               if (UNEXPECTED(EG(exception))) {
+                                       OBJ_RELEASE(Z_OBJ(obj));
+                                       break;
+                               }
 
                                if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
                                        zval rv2;