com php-src: Revert "Fix a few valgrind warnings with undefing result": Zend/zend_execute.c Zend/zend_vm_def.h Zend/zend _vm_execute.h
| From: | Dmitry Stogov | Date: | Fri, 02 Dec 2016 08:58:25 +0000 |
| Subject: | com php-src: Revert "Fix a few valgrind warnings with undefing result": Zend/zend_execute.c Zend/zend_vm_def.h Zend/zend _vm_execute.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-96142@lists.php.net to get a copy of this message | ||
Commit: 8fa691ea8ac72061414154cc3f4fb5cdf3972414
Author: Dmitry Stogov <dmitry@zend.com> Fri, 2 Dec 2016 11:58:25 +0300
Parents: b1261456d11c7069f1b8083a8adf5f3e9c7ad5bc
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8fa691ea8ac72061414154cc3f4fb5cdf3972414
Log:
Revert "Fix a few valgrind warnings with undefing result"
This reverts commit 8f4e100f21b06e745e56f55ce49c248442f8e642.
Changed paths:
M Zend/zend_execute.c
M Zend/zend_vm_def.h
M Zend/zend_vm_execute.h
Diff:
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index 363586d..4f692ac 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -1415,9 +1415,7 @@ static zend_never_inline void zend_pre_incdec_overloaded_property(zval
*object,
zptr = z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, cache_slot, &rv);
if (UNEXPECTED(EG(exception))) {
OBJ_RELEASE(Z_OBJ(obj));
- if (result) {
- ZVAL_UNDEF(result);
- }
+ ZVAL_UNDEF(result);
return;
}
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h
index f12f446..32c2e9b 100644
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@ -893,9 +893,7 @@ ZEND_VM_C_LABEL(assign_dim_op_convert_to_array):
zend_check_string_offset(dim, BP_VAR_RW);
zend_wrong_string_offset();
}
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_UNDEF(EX_VAR(opline->result.var));
- }
+ ZVAL_UNDEF(EX_VAR(opline->result.var));
} else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
ZEND_VM_C_GOTO(assign_dim_op_convert_to_array);
} else {
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index a72f0c9..7feab78 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -17475,9 +17475,7 @@ assign_dim_op_convert_to_array:
zend_check_string_offset(dim, BP_VAR_RW);
zend_wrong_string_offset();
}
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_UNDEF(EX_VAR(opline->result.var));
- }
+ ZVAL_UNDEF(EX_VAR(opline->result.var));
} else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
goto assign_dim_op_convert_to_array;
} else {
@@ -20892,9 +20890,7 @@ assign_dim_op_convert_to_array:
zend_check_string_offset(dim, BP_VAR_RW);
zend_wrong_string_offset();
}
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_UNDEF(EX_VAR(opline->result.var));
- }
+ ZVAL_UNDEF(EX_VAR(opline->result.var));
} else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
goto assign_dim_op_convert_to_array;
} else {
@@ -22260,9 +22256,7 @@ assign_dim_op_convert_to_array:
zend_check_string_offset(dim, BP_VAR_RW);
zend_wrong_string_offset();
}
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_UNDEF(EX_VAR(opline->result.var));
- }
+ ZVAL_UNDEF(EX_VAR(opline->result.var));
} else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
goto assign_dim_op_convert_to_array;
} else {
@@ -25204,9 +25198,7 @@ assign_dim_op_convert_to_array:
zend_check_string_offset(dim, BP_VAR_RW);
zend_wrong_string_offset();
}
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_UNDEF(EX_VAR(opline->result.var));
- }
+ ZVAL_UNDEF(EX_VAR(opline->result.var));
} else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
goto assign_dim_op_convert_to_array;
} else {
@@ -36868,9 +36860,7 @@ assign_dim_op_convert_to_array:
zend_check_string_offset(dim, BP_VAR_RW);
zend_wrong_string_offset();
}
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_UNDEF(EX_VAR(opline->result.var));
- }
+ ZVAL_UNDEF(EX_VAR(opline->result.var));
} else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
goto assign_dim_op_convert_to_array;
} else {
@@ -41460,9 +41450,7 @@ assign_dim_op_convert_to_array:
zend_check_string_offset(dim, BP_VAR_RW);
zend_wrong_string_offset();
}
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_UNDEF(EX_VAR(opline->result.var));
- }
+ ZVAL_UNDEF(EX_VAR(opline->result.var));
} else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
goto assign_dim_op_convert_to_array;
} else {
@@ -43927,9 +43915,7 @@ assign_dim_op_convert_to_array:
zend_check_string_offset(dim, BP_VAR_RW);
zend_wrong_string_offset();
}
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_UNDEF(EX_VAR(opline->result.var));
- }
+ ZVAL_UNDEF(EX_VAR(opline->result.var));
} else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
goto assign_dim_op_convert_to_array;
} else {
@@ -47997,9 +47983,7 @@ assign_dim_op_convert_to_array:
zend_check_string_offset(dim, BP_VAR_RW);
zend_wrong_string_offset();
}
- if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
- ZVAL_UNDEF(EX_VAR(opline->result.var));
- }
+ ZVAL_UNDEF(EX_VAR(opline->result.var));
} else if (EXPECTED(Z_TYPE_P(container) <= IS_FALSE)) {
goto assign_dim_op_convert_to_array;
} else {