diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2019-06-20 10:52:18 +0200 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-06-20 16:21:39 +0200 |
| commit | eaafb69eea9dba06ee542383a746d3668fa072cf (patch) | |
| tree | 56713e27861410b6767f9cc8347691ee3288dcbe /Zend/zend_execute.c | |
| parent | 961935fde224f4488d3335bf8f509fb679e06e58 (diff) | |
| download | php-git-eaafb69eea9dba06ee542383a746d3668fa072cf.tar.gz | |
Change indexing scheme for symtable_cache
symtable_cache_ptr now points to the first unused symtable_cache
entry, rahter than the last used one. This avoids taking a pointer
to the minus first element of the array, which is UB. Instead we
take a pointer to the end plus one, which is not UB.
Diffstat (limited to 'Zend/zend_execute.c')
| -rw-r--r-- | Zend/zend_execute.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 5588ada56a..95a63e9bcf 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -3337,7 +3337,7 @@ ZEND_API void zend_clean_and_cache_symbol_table(zend_array *symbol_table) /* {{{ /* clean before putting into the cache, since clean could call dtors, which could use cached hash */ zend_symtable_clean(symbol_table); - *(++EG(symtable_cache_ptr)) = symbol_table; + *(EG(symtable_cache_ptr)++) = symbol_table; } } /* }}} */ |
