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

From: Date: Wed, 08 Jun 2005 20:10:15 +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-3773@lists.php.net to get a copy of this message
Hi Marcus, In this case we have conditional branch on comparsion with uninitialized values. So I initialized them to avoid unpredictable behavior. Thanks. Dmitry. > -----Original Message----- > From: Marcus Boerger [mailto:mail@marcus-boerger.de] > Sent: Wednesday, June 08, 2005 11:18 PM > To: Dmitry Stogov > Cc: zend-engine-cvs@lists.php.net > Subject: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2(PHP_5_0) / > zend_compile.c > > > 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&r > > 2=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 > > -- > Zend Engine CVS Mailing List (http://cvs.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

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