Hi Marcus,
I don't know, how is it possible to create class without function table.
In any case it shouldn't crash because zend_objects_destroy_object() uses
ce->destructor and doesn't lookup into function_table.
Let me know if this patch breaks something for you.
Dmitry.
> -----Original Message-----
> From: Marcus Boerger [mailto:helly@xxxxxxx]
> Sent: Tuesday, November 15, 2005 10:28 PM
> To: Dmitry Stogov
> Cc: zend-engine-cvs@xxxxxxxxxxxxx
> Subject: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_objects_API.c
>
>
> Hello Dmitry,
>
> what if i have an overloaded object that doesn't have a
> normal function
> table, wouldn't it crash?
>
> regards
> marcus
>
> Tuesday, November 15, 2005, 1:39:59 PM, you wrote:
>
> > dmitry Tue Nov 15 07:39:59 2005 EDT
>
> > Modified files:
> > /ZendEngine2 zend_objects_API.c
> > Log:
> > Fixed call to __destruct() for objects of classes delivered from
> > internal ones those use zend_objects_store_put(obj, NULL, ...
> >
> >
> >
> http://cvs.php.net/diff.php/ZendEngine2/zend_objects_API.c?r1=1.50&r2=
> > 1.51&ty=u
> > Index: ZendEngine2/zend_objects_API.c
> > diff -u ZendEngine2/zend_objects_API.c:1.50
> ZendEngine2/zend_objects_API.c:1.51
> > --- ZendEngine2/zend_objects_API.c:1.50 Mon Oct 10 10:30:05 2005
> > +++ ZendEngine2/zend_objects_API.c Tue Nov 15 07:39:54 2005
> > @@ -17,7 +17,7 @@
> >
> >
> +-------------------------------------------------------------
> ---------+
> > */
> >
> > -/* $Id: zend_objects_API.c,v 1.50 2005/10/10 14:30:05
> iliaa Exp $ */
> > +/* $Id: zend_objects_API.c,v 1.51 2005/11/15 12:39:54
> dmitry Exp $ */
> >
> > #include "zend.h"
> > #include "zend_globals.h"
> > @@ -111,7 +111,7 @@
> >
> > obj->refcount = 1;
> > obj->object = object;
> > - obj->dtor = dtor;
> > + obj->dtor =
> > dtor?dtor:(zend_objects_store_dtor_t)zend_objects_destroy_object;
> > obj->free_storage = free_storage;
> >
> > obj->clone = clone;
>
>
>
>
> Best regards,
> Marcus
>
>
--
Zend Engine CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
|