From a839ba5c656f9f48513336ad63a269acde468786 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Tue, 26 Jun 2018 10:50:23 +0200 Subject: [PATCH 1/1] Add debug --- bbcode.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bbcode.c b/bbcode.c index 8c15a10..863d84f 100644 --- a/bbcode.c +++ b/bbcode.c @@ -110,6 +110,8 @@ static zend_object *bbcode_clone(zval *obj TSRMLS_DC) { bbcode_object *oldobj = (bbcode_object *)((char *)obj - XtOffsetOf(bbcode_object, std)); + printf("bbcode_clone=%d\n", sizeof(bbcode_object) + zend_object_properties_size(Z_OBJCE_P(obj))); + bbcode_object *newobj = ecalloc(1, sizeof(bbcode_object) + zend_object_properties_size(Z_OBJCE_P(obj))); zend_object_std_init(&newobj->std, Z_OBJCE_P(obj) TSRMLS_CC); @@ -165,6 +167,8 @@ static zend_object_value bbcode_clone(zval *obj TSRMLS_DC) #endif static zend_object *bbcode_create(zend_class_entry *ce TSRMLS_DC) { + printf("bbcode_clone=%d\n", sizeof(bbcode_object) + zend_object_properties_size(ce)); + bbcode_object *obj = ecalloc(1, sizeof(bbcode_object) + zend_object_properties_size(ce));//emalloc(sizeof(bbcode_object)); obj->flag = 0; //memset(obj, 0, sizeof(bbcode_object)); -- 2.41.1