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)));
}
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)));
}
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)));
}