Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_vm_def.h zend_vm_execute.h /tests bug30725.phpt

From: Date: Tue, 25 Jan 2005 10:47:42 +0000
Subject: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_vm_def.h zend_vm_execute.h /tests bug30725.phpt
References: 1 2  Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-3340@lists.php.net to get a copy of this message
Hello Dmitry, thanks for the hint. marcus Tuesday, January 25, 2005, 7:42:48 AM, you wrote: > Hi Marcus, > You should use > if (opline->extended_value) { > FREE_OP1_VAR_PTR(); > } else { > FREE_OP1_IF_VAR(); > } > instead of > if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; > free_op1.var is not set in case then op1.op_type == IS_CONST (it shouldn't > be set if op1.op_type == IS_CV too), so your code is dangerous. > Thanks. Dmitry. >> -----Original Message----- >> From: Marcus Boerger [mailto:helly@php.net] >> Sent: Monday, January 24, 2005 23:03 >> To: zend-engine-cvs@lists.php.net >> Subject: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_vm_def.h >> zend_vm_execute.h /tests bug30725.phpt >> >> >> helly Mon Jan 24 15:02:56 2005 EDT >> >> Modified files: >> /ZendEngine2 zend_vm_def.h zend_vm_execute.h >> /ZendEngine2/tests bug30725.phpt >> Log: >> - Second and last part of #30725 fix >> >> >> >> http://cvs.php.net/diff.php/ZendEngine2/zend_vm_def.h?r1=1.9&r >> 2=1.10&ty=u >> Index: ZendEngine2/zend_vm_def.h >> diff -u ZendEngine2/zend_vm_def.h:1.9 ZendEngine2/zend_vm_def.h:1.10 >> --- ZendEngine2/zend_vm_def.h:1.9 Fri Jan 14 04:01:21 2005 >> +++ ZendEngine2/zend_vm_def.h Mon Jan 24 15:02:51 2005 >> @@ -16,7 +16,7 @@ >> >> +------------------------------------------------------------- >> ---------+ >> */ >> >> -/* $Id: zend_vm_def.h,v 1.9 2005/01/14 09:01:21 dmitry Exp $ */ >> +/* $Id: zend_vm_def.h,v 1.10 2005/01/24 20:02:51 helly Exp $ */ >> >> ZEND_VM_HANDLER(1, ZEND_ADD, CONST|TMP|VAR|CV, >> CONST|TMP|VAR|CV) { @@ -2863,10 +2863,13 @@ >> if (ce && ce->get_iterator) { >> iter = ce->get_iterator(ce, array_ptr TSRMLS_CC); >> >> - if (iter) { >> + if (iter && !EG(exception)) { >> array_ptr = zend_iterator_wrap(iter TSRMLS_CC); >> } else { >> - array_ptr->refcount++; >> + zval_ptr_dtor(&array_ptr); >> + if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; >> + zend_throw_exception_internal(NULL TSRMLS_CC); >> + ZEND_VM_NEXT_OPCODE(); >> } >> } >> [...]

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