-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed
Labels
Description
Description
In zend_opcode.c, the prop_info->attributes
hashtable is not released for internal classes.
Here's an excerpt of the current code (comments added):
ZEND_HASH_MAP_FOREACH_PTR(&ce->properties_info, prop_info) {
if (prop_info->ce == ce) {
zend_string_release(prop_info->name);
zend_type_release(prop_info->type, /* persistent */ 1);
// ----------
// Notice the missing if(prop_info->attributes) zend_hash_release(prop_info->attributes);
// ----------
free(prop_info);
}
} ZEND_HASH_FOREACH_END();
Excerpt of the memcheck report:
==1815282== 32 bytes in 1 blocks are indirectly lost in loss record 1 of 2
==1815282== at 0x48407B4: malloc (vg_replace_malloc.c:381)
==1815282== by 0x758E63: __zend_malloc (zend_alloc.c:3116)
==1815282== by 0x7CE6E6: zend_add_attribute (zend_attributes.c:284)
==1815282== by 0x7862B61: zend_add_property_attribute (zend_attributes.h:112)
PHP Version
PHP 8.3-dev
Operating System
irrelevant