Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2(PHP_5_0) / zend_compile.c

From: Date: Wed, 08 Jun 2005 19:17:31 +0000
Subject: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2(PHP_5_0) / zend_compile.c
References: 1  Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-3772@lists.php.net to get a copy of this message
Hello Dmitry, please don't try to make the *errors* sounds like something which is only a problem in valgrind. Anything *detected* by valgrind is a real memory corruption or memory leak thus fixing them we might fix memleaks, wired errors that seem completley unrelated or even real directly connected segmentation violations. marcus Wednesday, June 8, 2005, 8:10:30 PM, you wrote: > dmitry Wed Jun 8 14:10:30 2005 EDT > Modified files: (Branch: PHP_5_0) > /ZendEngine2 zend_compile.c > Log: > Fixed valgrind errors > > http://cvs.php.net/diff.php/ZendEngine2/zend_compile.c?r1=1.567.2.22&r2=1.567.2.23&ty=u > Index: ZendEngine2/zend_compile.c > diff -u ZendEngine2/zend_compile.c:1.567.2.22 > ZendEngine2/zend_compile.c:1.567.2.23 > --- ZendEngine2/zend_compile.c:1.567.2.22 Wed Jun 8 02:48:37 2005 > +++ ZendEngine2/zend_compile.c Wed Jun 8 14:10:28 2005 > @@ -17,7 +17,7 @@ > > +----------------------------------------------------------------------+ > */ > -/* $Id: zend_compile.c,v 1.567.2.22 2005/06/08 06:48:37 dmitry Exp $ */ > +/* $Id: zend_compile.c,v 1.567.2.23 2005/06/08 18:10:28 dmitry Exp $ */ > #include <zend_language_parser.h> > #include "zend.h" > @@ -2582,7 +2582,8 @@ > /* Inherit interfaces */ > if (ce->num_interfaces > 0) { > - ce->interfaces = (zend_class_entry **) > erealloc(ce->interfaces, sizeof(zend_class_entry *)*ce->num_interfaces); > + ce->interfaces = (zend_class_entry **) > emalloc(sizeof(zend_class_entry *)*ce->num_interfaces); > + memset(ce->interfaces, 0, sizeof(zend_class_entry *)*ce->num_interfaces); > } > if (!(ce->ce_flags & > (ZEND_ACC_INTERFACE|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)) > && ((parent_token->op_type != IS_UNUSED) || (ce->num_interfaces > > 0))) { -- Best regards, Marcus mailto:mail@marcus-boerger.de

« previous php.zend-engine.cvs (#3772) next »