RE: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_builtin_functions.c php-src NEWS
| From: | Dmitry Stogov | Date: | Tue, 01 Nov 2005 07:03:21 +0000 |
| Subject: | RE: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_builtin_functions.c php-src NEWS | ||
| References: | 1 | Groups: | php.zend-engine.cvs |
| Request: | Send a blank email to php-zend-engine-cvs+get-4306@lists.php.net to get a copy of this message | ||
Hi Marcus,
> -----Original Message-----
> From: Marcus Boerger [mailto:helly@php.net]
> Sent: Monday, October 31, 2005 11:48 PM
> To: Dmitry Stogov
> Cc: 'Derick Rethans'; 'Zeev Suraski'; 'Sebastian Bergmann';
> zend-engine-cvs@lists.php.net; 'Andi Gutmans'; 'Marcus
> Boerger'; 'Ilia Alshanetsky'
> Subject: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 /
> zend_builtin_functions.c php-src NEWS
>
>
> Hello Dmitry,
>
> two things
>
> - we can store whether the dtor was called or ctor failed
> easily in the
> objects flag right where in_set/in_get reside.
We already store this info in objects store bucket.
> - if recount is 1 then the object must not be stored in the exception
> because it will get destructed and must therefore of course
> not stored
> in the exception. That on the other hand means the first
> thing is not
> necessary.
Yes. But with Sebastian's patch object is stored in bactrace.
So refcount is more then 1 and we cannot simple destroy it.
Thanks. Dmitry.
> marcus
>
> Monday, October 31, 2005, 9:35:21 PM, you wrote:
>
> >> -----Original Message-----
> >> From: Derick Rethans [mailto:derick@php.net]
> >> Sent: Monday, October 31, 2005 11:32 PM
> >> To: Dmitry Stogov
> >> Cc: 'Zeev Suraski'; 'Sebastian Bergmann';
> >> zend-engine-cvs@lists.php.net; 'Andi Gutmans'; 'Marcus
> >> Boerger'; 'Ilia Alshanetsky'
> >> Subject: RE: [ZEND-ENGINE-CVS] cvs: ZendEngine2 /
> >> zend_builtin_functions.c php-src NEWS
> >>
> >>
> >> On Mon, 31 Oct 2005, Dmitry Stogov wrote:
> >>
> >> > The problem is conceptual.
> >> > Before this patch PHP looked for EG(exception) after calling
> >> > constructor and disabled destructor calling.
> >> >
> >> > if (EG(exception) && ctor_opline) {
> >> > if (RETURN_VALUE_USED(ctor_opline)) {
> >> > EG(This)->refcount--;
> >> > }
> >> > if (EG(This)->refcount == 1) {
> >> > zend_object_store_ctor_failed(EG(This) TSRMLS_CC);
> >> > }
> >> > }
> >> >
> >> > Now the object also stored in backtrace so refcount is
> more then 1.
> >> > Probably we can check refcount with 2, but I am not sure
> that is a
> >> > proper way.
> >>
> >> We can also revert it simply, as I don't see a huge point in
> >> having the
> >> object *itself* in the backtrace...
> >>
> >> Derick
>
> > Of course we can. :)
> > But probably $this can be really useful in debug backtrace.
>
> > Dmitry.
>
>
>
>
>
> Best regards,
> Marcus
>
> --
> Zend Engine CVS Mailing List (http://cvs.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>