com php-src: Added assertions: Zend/zend_execute.c
| From: | Dmitry Stogov | Date: | Wed, 03 Oct 2018 09:31:47 +0000 |
| Subject: | com php-src: Added assertions: Zend/zend_execute.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-103323@lists.php.net to get a copy of this message | ||
Commit: 9418144054122463585beb0a65445a92757a871d
Author: Dmitry Stogov <dmitry@zend.com> Wed, 3 Oct 2018 12:31:47 +0300
Parents: a659d16adf996344d8c233b49f6077641d3800b6
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9418144054122463585beb0a65445a92757a871d
Log:
Added assertions
Changed paths:
M Zend/zend_execute.c
Diff:
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index e204ae5..cbaa53f 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -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);
}