cvs: php4 /ext/standard aggregation.c
| From: | Wez Furlong | Date: | Wed, 13 Mar 2002 02:49:03 +0000 |
| Subject: | cvs: php4 /ext/standard aggregation.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-10049@lists.php.net to get a copy of this message | ||
wez Tue Mar 12 21:49:03 2002 EDT
Modified files:
/php4/ext/standard aggregation.c
Log:
I've altered my diagnosis of segfault/leak problem
Index: php4/ext/standard/aggregation.c
diff -u php4/ext/standard/aggregation.c:1.5 php4/ext/standard/aggregation.c:1.6
--- php4/ext/standard/aggregation.c:1.5 Tue Mar 12 21:14:28 2002
+++ php4/ext/standard/aggregation.c Tue Mar 12 21:49:03 2002
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: aggregation.c,v 1.5 2002/03/13 02:14:28 wez Exp $ */
+/* $Id: aggregation.c,v 1.6 2002/03/13 02:49:03 wez Exp $ */
#include "php.h"
#include "basic_functions.h"
@@ -28,16 +28,19 @@
static void aggregation_info_dtor(aggregation_info *info)
{
/* FIXME: This is here to make it compile with Engine 2 but part of this module will need
rewriting */
+
#ifndef ZEND_ENGINE_2
destroy_zend_class(info->new_ce);
efree(info->new_ce);
#else
- /* FIXME: In ZE2, this dtor is called prior to deleting the objects,
- * which causes this new_ce to be destroyed twice (which is bad news).
- * Skipping deleting it here will prevent a segfault but will leak
- * the class name, the static_members hash and the ce itself */
+ /* FIXME: In ZE2, there seems to be an issue with refcounts or something between
+ * this class entry and the original; there are problems when destroying the
+ * function table.
+ * Skipping deleting here will prevent a segfault but will leak
+ * the class name, the static_members hash and the ce itself.
+ * */
- /* destroy_zend_class(&info->new_ce); */
+ /* destroy_zend_class(&info->new_ce); */
#endif
zval_ptr_dtor(&info->aggr_members);
@@ -131,6 +134,7 @@
*/
if (zend_hash_add(&ce->function_table, func_name, func_name_len,
(void*)function, sizeof(zend_function), NULL) == SUCCESS) {
+
add_next_index_stringl(aggr_methods, func_name, func_name_len-1, 1);
}