Merge branch 'master' of git.php.net:/php-src

This commit is contained in:
Kalle Sommer Nielsen 2018-10-03 11:36:30 +02:00
commit b1f6390f16
2 changed files with 7 additions and 0 deletions

View File

@ -2581,6 +2581,7 @@ static zend_always_inline void i_init_code_execute_data(zend_execute_data *execu
zend_attach_symbol_table(execute_data);
if (!op_array->run_time_cache) {
ZEND_ASSERT(op_array->fn_flags & ZEND_ACC_HEAP_RT_CACHE);
op_array->run_time_cache = emalloc(op_array->cache_size);
memset(op_array->run_time_cache, 0, op_array->cache_size);
}
@ -2618,6 +2619,7 @@ ZEND_API void zend_init_code_execute_data(zend_execute_data *execute_data, zend_
{
EX(prev_execute_data) = EG(current_execute_data);
if (!op_array->run_time_cache) {
ZEND_ASSERT(op_array->fn_flags & ZEND_ACC_HEAP_RT_CACHE);
op_array->run_time_cache = emalloc(op_array->cache_size);
memset(op_array->run_time_cache, 0, op_array->cache_size);
}

View File

@ -639,6 +639,11 @@ static zend_function *do_inherit_method(zend_string *key, zend_function *parent,
zend_function *func = (zend_function*)Z_PTR_P(child);
zend_function *orig_prototype = func->common.prototype;
if (UNEXPECTED(func == parent)) {
/* The same method in interface may be inhereted few times */
return NULL;
}
do_inheritance_check_on_method(func, parent);
if (func->common.prototype != orig_prototype &&
func->type == ZEND_USER_FUNCTION &&