com php-src: Merge branch 'PHP-7.3' into PHP-7.4: Zend/zend_v m_def.h Zend/zend_vm_execute.h
| From: | Nikita Popov | Date: | Thu, 29 Aug 2019 10:34:07 +0000 |
| Subject: | com php-src: Merge branch 'PHP-7.3' into PHP-7.4: Zend/zend_v m_def.h Zend/zend_vm_execute.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-108125@lists.php.net to get a copy of this message | ||
Commit: a12fe30590cab7524a439f25828f636d6093f7ea
Author: Nikita Popov <nikita.ppv@gmail.com> Thu, 29 Aug 2019 12:34:07 +0200
Parents: 43551405d5d4b2407b7a9c76bcee83750c91c30f 34edd4aa2aa100a39075d3c4b086165f8c372945
Branches: PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a12fe30590cab7524a439f25828f636d6093f7ea
Log:
Merge branch 'PHP-7.3' into PHP-7.4
Changed paths:
MM Zend/zend_vm_def.h
MM Zend/zend_vm_execute.h
Diff:
diff --cc Zend/zend_vm_def.h
index c10f9d6,99b731b..aa7a80c
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@@ -2909,8 -2430,22 +2909,13 @@@ ZEND_VM_HOT_HELPER(zend_leave_helper, A
zend_clean_and_cache_symbol_table(EX(symbol_table));
}
EG(current_execute_data) = EX(prev_execute_data);
+
+ /* Free extra args before releasing the closure,
+ * as that may free the op_array. */
+ zend_vm_stack_free_extra_args_ex(call_info, execute_data);
+
if (UNEXPECTED(call_info & ZEND_CALL_RELEASE_THIS)) {
- zend_object *object = Z_OBJ(execute_data->This);
-#if 0
- if (UNEXPECTED(EG(exception) != NULL) && (EX(opline)->op1.num & ZEND_CALL_CTOR))
{
-#else
- if (UNEXPECTED(EG(exception) != NULL) && (call_info & ZEND_CALL_CTOR)) {
-#endif
- GC_DELREF(object);
- zend_object_store_ctor_failed(object);
- }
- OBJ_RELEASE(object);
+ OBJ_RELEASE(Z_OBJ(execute_data->This));
} else if (UNEXPECTED(call_info & ZEND_CALL_CLOSURE)) {
OBJ_RELEASE(ZEND_CLOSURE_OBJECT(EX(func)));
}
diff --cc Zend/zend_vm_execute.h
index 6ac1d09,b29f5bd..6bc3bb2
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@@ -1173,8 -541,22 +1173,13 @@@ static zend_never_inline ZEND_OPCODE_HA
zend_clean_and_cache_symbol_table(EX(symbol_table));
}
EG(current_execute_data) = EX(prev_execute_data);
+
+ /* Free extra args before releasing the closure,
+ * as that may free the op_array. */
+ zend_vm_stack_free_extra_args_ex(call_info, execute_data);
+
if (UNEXPECTED(call_info & ZEND_CALL_RELEASE_THIS)) {
- zend_object *object = Z_OBJ(execute_data->This);
-#if 0
- if (UNEXPECTED(EG(exception) != NULL) && (EX(opline)->op1.num & ZEND_CALL_CTOR))
{
-#else
- if (UNEXPECTED(EG(exception) != NULL) && (call_info & ZEND_CALL_CTOR)) {
-#endif
- GC_DELREF(object);
- zend_object_store_ctor_failed(object);
- }
- OBJ_RELEASE(object);
+ OBJ_RELEASE(Z_OBJ(execute_data->This));
} else if (UNEXPECTED(call_info & ZEND_CALL_CLOSURE)) {
OBJ_RELEASE(ZEND_CLOSURE_OBJECT(EX(func)));
}
@@@ -53366,8 -55379,22 +53370,13 @@@ zend_leave_helper_SPEC_LABEL
zend_clean_and_cache_symbol_table(EX(symbol_table));
}
EG(current_execute_data) = EX(prev_execute_data);
+
+ /* Free extra args before releasing the closure,
+ * as that may free the op_array. */
+ zend_vm_stack_free_extra_args_ex(call_info, execute_data);
+
if (UNEXPECTED(call_info & ZEND_CALL_RELEASE_THIS)) {
- zend_object *object = Z_OBJ(execute_data->This);
-#if 0
- if (UNEXPECTED(EG(exception) != NULL) && (EX(opline)->op1.num & ZEND_CALL_CTOR))
{
-#else
- if (UNEXPECTED(EG(exception) != NULL) && (call_info & ZEND_CALL_CTOR)) {
-#endif
- GC_DELREF(object);
- zend_object_store_ctor_failed(object);
- }
- OBJ_RELEASE(object);
+ OBJ_RELEASE(Z_OBJ(execute_data->This));
} else if (UNEXPECTED(call_info & ZEND_CALL_CLOSURE)) {
OBJ_RELEASE(ZEND_CLOSURE_OBJECT(EX(func)));
}