Skip to content

Commit

Permalink
Added assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Oct 3, 2018
1 parent a659d16 commit 9418144
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Zend/zend_execute.c
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 9418144

Please sign in to comment.