Skip to content

Commit

Permalink
Fix mutable data initialization during lazy class loading
Browse files Browse the repository at this point in the history
  • Loading branch information
nikic committed Aug 2, 2021
1 parent 9fe3aab commit 6e91a82
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Zend/zend_inheritance.c
Original file line number Diff line number Diff line change
Expand Up @@ -2593,6 +2593,11 @@ static zend_class_entry *zend_lazy_class_load(zend_class_entry *pce)
ce->ce_flags &= ~ZEND_ACC_IMMUTABLE;
ce->refcount = 1;
ce->inheritance_cache = NULL;
if (CG(compiler_options) & ZEND_COMPILE_PRELOAD) {
ZEND_MAP_PTR_NEW(ce->mutable_data);
} else {
ZEND_MAP_PTR_INIT(ce->mutable_data, NULL);
}

/* properties */
if (ce->default_properties_table) {
Expand Down

0 comments on commit 6e91a82

Please sign in to comment.