Skip to content

Commit 18b43d2

Browse files
committed
Fix Zend/tests/type_declarations/variance/class_order_autoload1.phpt
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.
1 parent 0f21cbc commit 18b43d2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ext/opcache/ZendAccelerator.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2358,14 +2358,14 @@ static zend_class_entry* zend_accel_inheritance_cache_add(zend_class_entry *ce,
23582358
while (entry) {
23592359
entry = zend_accel_inheritance_cache_find(entry, proto, parent, traits_and_interfaces, &needs_autoload);
23602360
if (entry) {
2361+
zend_shared_alloc_unlock();
2362+
SHM_PROTECT();
23612363
if (!needs_autoload) {
2362-
zend_shared_alloc_unlock();
2363-
SHM_PROTECT();
2364-
23652364
zend_map_ptr_extend(ZCSG(map_ptr_last));
23662365
return entry->ce;
2366+
} else {
2367+
return NULL;
23672368
}
2368-
ZEND_ASSERT(0); // entry = entry->next; // This shouldn't be posible ???
23692369
}
23702370
}
23712371

0 commit comments

Comments
 (0)