summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2015-05-17 13:46:54 +0200
committerNikita Popov <nikic@php.net>2015-05-17 13:46:54 +0200
commit0df2f470fa194b28f1eb9e5788b8cf4c3f03f5f7 (patch)
tree1a56bc4275da977b8169a0062bcbec9bde2cfa06
parent2660fb96aac78658f4f7c1ac4101c3f464536ca9 (diff)
downloadphp-git-0df2f470fa194b28f1eb9e5788b8cf4c3f03f5f7.tar.gz
Don't write prop if read prop threw exception
-rw-r--r--Zend/tests/closure_038.phpt5
-rw-r--r--Zend/tests/closure_039.phpt5
-rw-r--r--Zend/tests/exception_during_property_assign_op.phpt21
-rw-r--r--Zend/zend_vm_def.h12
-rw-r--r--Zend/zend_vm_execute.h108
5 files changed, 141 insertions, 10 deletions
diff --git a/Zend/tests/closure_038.phpt b/Zend/tests/closure_038.phpt
index b1e9406872..61fcc1cb94 100644
--- a/Zend/tests/closure_038.phpt
+++ b/Zend/tests/closure_038.phpt
@@ -64,9 +64,4 @@ Next exception 'EngineException' with message 'Cannot access private property B:
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}
thrown in %s on line %d
diff --git a/Zend/tests/closure_039.phpt b/Zend/tests/closure_039.phpt
index 9e5ecbd21b..ecdf9be080 100644
--- a/Zend/tests/closure_039.phpt
+++ b/Zend/tests/closure_039.phpt
@@ -64,9 +64,4 @@ Next exception 'EngineException' with message 'Cannot access private property B:
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}
thrown in %s on line %d
diff --git a/Zend/tests/exception_during_property_assign_op.phpt b/Zend/tests/exception_during_property_assign_op.phpt
new file mode 100644
index 0000000000..0c4c5d098d
--- /dev/null
+++ b/Zend/tests/exception_during_property_assign_op.phpt
@@ -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) {
+}
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h
index c1f855809c..c8626f185b 100644
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@ -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;
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index 6b7f91b8d7..5ee528e759 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -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;