From 44e5c04e5546e60cdbc31360adf3876b7c706152 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 27 Feb 2023 21:39:18 +0300 Subject: [PATCH] Fix incorrect inheritance cache update (#10719) --- ext/opcache/ZendAccelerator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index a912b5e604b..36ce9402811 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -2354,9 +2354,9 @@ static zend_class_entry* zend_accel_inheritance_cache_add(zend_class_entry *ce, SHM_UNPROTECT(); zend_shared_alloc_lock(); - entry = ce->inheritance_cache; + entry = proto->inheritance_cache; while (entry) { - entry = zend_accel_inheritance_cache_find(entry, ce, parent, traits_and_interfaces, &needs_autoload); + entry = zend_accel_inheritance_cache_find(entry, proto, parent, traits_and_interfaces, &needs_autoload); if (entry) { if (!needs_autoload) { zend_shared_alloc_unlock();