logo       

Re: cvs: ZendEngine2 / zend_vm_def.h zend_vm_execute.h /tests bug30725.php: msg#00084

Subject: Re: cvs: ZendEngine2 / zend_vm_def.h zend_vm_execute.h /tests bug30725.phpt
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@xxxxxxx] 
>> Sent: Monday, January 24, 2005 23:03
>> To: zend-engine-cvs@xxxxxxxxxxxxx
>> 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();
>>               }
>>       }
>>  
[...]

-- 
Zend Engine CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe