Skip to content

Commit 5eb7d7e

Browse files
dstogovsaundefined
authored andcommitted
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. (cherry picked from commit 18b43d2)
1 parent 4c2db35 commit 5eb7d7e

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
@@ -2357,14 +2357,14 @@ static zend_class_entry* zend_accel_inheritance_cache_add(zend_class_entry *ce,
23572357
while (entry) {
23582358
entry = zend_accel_inheritance_cache_find(entry, proto, parent, traits_and_interfaces, &needs_autoload);
23592359
if (entry) {
2360+
zend_shared_alloc_unlock();
2361+
SHM_PROTECT();
23602362
if (!needs_autoload) {
2361-
zend_shared_alloc_unlock();
2362-
SHM_PROTECT();
2363-
23642363
zend_map_ptr_extend(ZCSG(map_ptr_last));
23652364
return entry->ce;
2365+
} else {
2366+
return NULL;
23662367
}
2367-
ZEND_ASSERT(0); // entry = entry->next; // This shouldn't be possible ???
23682368
}
23692369
}
23702370

0 commit comments

Comments
 (0)