Re: [ZEND-ENGINE-CVS] cvs: Zend(PHP_4_3) / zend_execute.c
| From: | Moriyoshi Koizumi | Date: | Thu, 06 Mar 2003 19:28:55 +0000 |
| Subject: | Re: [ZEND-ENGINE-CVS] cvs: Zend(PHP_4_3) / zend_execute.c | ||
| References: | 1 | Groups: | php.zend-engine.cvs |
| Request: | Send a blank email to php-zend-engine-cvs+get-1010@lists.php.net to get a copy of this message | ||
Here's a better one.
Moriyoshi
Moriyoshi Koizumi <moriyoshi@at.wakwak.com> wrote:
> I'm going to come up with a better patch soon.
> Stay tuned.
>
> Moriyoshi
>
> Jani Taskinen <sniper@iki.fi> wrote:
>
> >
> > Oh crap..so we don't have any tests for THAT then. :)
> >
> > --Jani
>
>
> --
> Zend Engine CVS Mailing List (http://cvs.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
Index: Zend/zend_execute.c =================================================================== RCS file: /repository/Zend/zend_execute.c,v retrieving revision 1.316.2.5 diff -u -r1.316.2.5 zend_execute.c --- Zend/zend_execute.c 6 Mar 2003 16:28:00 -0000 1.316.2.5 +++ Zend/zend_execute.c 6 Mar 2003 19:24:11 -0000 @@ -371,10 +371,19 @@ } T->EA.data.str_offset.str->value.str.val[T->EA.data.str_offset.offset] = final_value->value.str.val[0]; - if (op2 - && op2->op_type != IS_VAR - && final_value == &Ts[op2->u.var].tmp_var) { - STR_FREE(final_value->value.str.val); + if (op2) { + if (op2->op_type == IS_VAR) { + if (value==&Ts[op2->u.var].tmp_var) { + STR_FREE(value->value.str.val); + } + } else { + if (final_value==&Ts[op2->u.var].tmp_var) { + /* we can safely free final_value here + * because separation is done only + * in case op2->op_type == IS_VAR */ + STR_FREE(final_value->value.str.val); + } + } } if (final_value == &tmp) { zval_dtor(final_value);
Index: Zend/zend_execute.c =================================================================== RCS file: /repository/Zend/zend_execute.c,v retrieving revision 1.316.2.5 diff -u -r1.316.2.5 zend_execute.c --- Zend/zend_execute.c 6 Mar 2003 16:28:00 -0000 1.316.2.5 +++ Zend/zend_execute.c 6 Mar 2003 19:24:11 -0000 @@ -371,10 +371,19 @@ } T->EA.data.str_offset.str->value.str.val[T->EA.data.str_offset.offset] = final_value->value.str.val[0]; - if (op2 - && op2->op_type != IS_VAR - && final_value == &Ts[op2->u.var].tmp_var) { - STR_FREE(final_value->value.str.val); + if (op2) { + if (op2->op_type == IS_VAR) { + if (value==&Ts[op2->u.var].tmp_var) { + STR_FREE(value->value.str.val); + } + } else { + if (final_value==&Ts[op2->u.var].tmp_var) { + /* we can safely free final_value here + * because separation is done only + * in case op2->op_type == IS_VAR */ + STR_FREE(final_value->value.str.val); + } + } } if (final_value == &tmp) { zval_dtor(final_value);