|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-11-02 15:04 UTC] cmb@php.net
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: cmb
[2021-11-02 15:04 UTC] cmb@php.net
[2021-11-02 15:22 UTC] nikic@php.net
[2021-11-14 04:22 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 00:00:01 2025 UTC |
Description: ------------ My custom zend_object look for doc_comment and get an error message from valgrind. I can fix it with ecalloc insteadof emalloc, // In Zend/zend_arena.h static zend_always_inline zend_arena* zend_arena_create(size_t size) { //zend_arena *arena = (zend_arena*)emalloc(size); zend_arena *arena = (zend_arena*)ecalloc(size, 1); [...] } but the initialization is partly already done in init_op_array () It's missing a : op_array-> doc_comment = NULL; but I don't know where. Can someone take care of it? Test script: --------------- static zend_object* php_gobject_object_create_object(zend_class_entry *class_type) { php_gobject_object *intern = zend_object_alloc(sizeof(php_gobject_object), class_type); zend_object_std_init(&intern->std, class_type); object_properties_init(&intern->std, class_type); // [...] zend_function *f; ZEND_HASH_FOREACH_PTR(&class_type->function_table, f) { if (f->op_array.doc_comment) { php_printf("\n", f->op_array.doc_comment->val); } }ZEND_HASH_FOREACH_END(); }