Skip to content

Commit

Permalink
Fix Zend/tests/type_declarations/variance/class_order_autoload1.phpt
Browse files Browse the repository at this point in the history
test failre introduced by 44e5c04

This ASSERT-ion path was never reached becuase of the bug fixed by
44e5c04. It's possible in case of
circular class dependencies that may resolved by __autoload().
Unfortunately these circular dependencies can't be stored in the
inheritace cahce.

(cherry picked from commit 18b43d2)
  • Loading branch information
dstogov authored and saundefined committed Mar 1, 2023
1 parent 4c2db35 commit 5eb7d7e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ext/opcache/ZendAccelerator.c
Expand Up @@ -2357,14 +2357,14 @@ static zend_class_entry* zend_accel_inheritance_cache_add(zend_class_entry *ce,
while (entry) {
entry = zend_accel_inheritance_cache_find(entry, proto, parent, traits_and_interfaces, &needs_autoload);
if (entry) {
zend_shared_alloc_unlock();
SHM_PROTECT();
if (!needs_autoload) {
zend_shared_alloc_unlock();
SHM_PROTECT();

zend_map_ptr_extend(ZCSG(map_ptr_last));
return entry->ce;
} else {
return NULL;
}
ZEND_ASSERT(0); // entry = entry->next; // This shouldn't be possible ???
}
}

Expand Down

0 comments on commit 5eb7d7e

Please sign in to comment.