diff options
Diffstat (limited to 'ext/opcache')
| -rw-r--r-- | ext/opcache/ZendAccelerator.c | 6 | ||||
| -rw-r--r-- | ext/opcache/zend_accelerator_util_funcs.c | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index c2e5690273..d2349b90bd 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -2251,7 +2251,7 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type) return zend_accel_load_script(persistent_script, from_shared_memory); } -static zend_inheritance_cache_entry* zend_accel_inheritance_cache_find(zend_inheritance_cache_entry *entry, zend_class_entry *ce, zend_class_entry *parent, zend_class_entry **traits_and_interfaces, bool *needs_autoload_ptr) +static zend_always_inline zend_inheritance_cache_entry* zend_accel_inheritance_cache_find(zend_inheritance_cache_entry *entry, zend_class_entry *ce, zend_class_entry *parent, zend_class_entry **traits_and_interfaces, bool *needs_autoload_ptr) { uint32_t i; @@ -2306,7 +2306,9 @@ static zend_class_entry* zend_accel_inheritance_cache_get(zend_class_entry *ce, entry = zend_accel_inheritance_cache_find(entry, ce, parent, traits_and_interfaces, &needs_autoload); if (entry) { if (!needs_autoload) { - zend_map_ptr_extend(ZCSG(map_ptr_last)); + if (ZCSG(map_ptr_last) > CG(map_ptr_last)) { + zend_map_ptr_extend(ZCSG(map_ptr_last)); + } return entry->ce; } diff --git a/ext/opcache/zend_accelerator_util_funcs.c b/ext/opcache/zend_accelerator_util_funcs.c index ad456c1bcb..6f101b0915 100644 --- a/ext/opcache/zend_accelerator_util_funcs.c +++ b/ext/opcache/zend_accelerator_util_funcs.c @@ -236,7 +236,9 @@ zend_op_array* zend_accel_load_script(zend_persistent_script *persistent_script, zend_string_release_ex(name, 0); } - zend_map_ptr_extend(ZCSG(map_ptr_last)); + if (ZCSG(map_ptr_last) > CG(map_ptr_last)) { + zend_map_ptr_extend(ZCSG(map_ptr_last)); + } } if (persistent_script->script.first_early_binding_opline != (uint32_t)-1) { |
