mirror of
https://github.com/php/php-src.git
synced 2024-11-28 04:14:26 +08:00
Don't track internal class dependencies
Subtyping relationships established on internal classes are always going to hold (if we ignore Windows), so there is no need to explicitly track them. This fixes an assertion failure in GH-7251.
This commit is contained in:
parent
58fb147cde
commit
a837d35366
@ -376,13 +376,17 @@ static void track_class_dependency(zend_class_entry *ce, zend_string *class_name
|
||||
return;
|
||||
}
|
||||
|
||||
#ifndef ZEND_WIN32
|
||||
/* On non-Windows systems, internal classes are always the same,
|
||||
* so there is no need to explicitly track them. */
|
||||
if (ce->type == ZEND_INTERNAL_CLASS) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
ht = (HashTable*)CG(current_linking_class)->inheritance_cache;
|
||||
|
||||
#ifndef ZEND_WIN32
|
||||
if (ce->type == ZEND_USER_CLASS && !(ce->ce_flags & ZEND_ACC_IMMUTABLE)) {
|
||||
#else
|
||||
if (!(ce->ce_flags & ZEND_ACC_IMMUTABLE)) {
|
||||
#endif
|
||||
// TODO: dependency on not-immutable class ???
|
||||
if (ht) {
|
||||
zend_hash_destroy(ht);
|
||||
|
Loading…
Reference in New Issue
Block a user