Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:21458 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8169 invoked by uid 1010); 10 Jan 2006 07:50:15 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 8154 invoked from network); 10 Jan 2006 07:50:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jan 2006 07:50:15 -0000 X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from ([80.74.107.235:18175] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 02/E3-54625-63763C34 for ; Tue, 10 Jan 2006 02:50:14 -0500 Received: (qmail 18231 invoked from network); 10 Jan 2006 07:50:09 -0000 Received: from internal.zend.office (HELO thinkpad) (10.1.1.1) by internal.zend.office with SMTP; 10 Jan 2006 07:50:09 -0000 To: "'Steph Fox'" Cc: "'Andrei'" , "'internals'" , "Andi Gutmans" , "Zeev Suraski" Date: Tue, 10 Jan 2006 10:49:25 +0300 Message-ID: <000001c615ba$64be95f0$6e02a8c0@thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 Importance: Normal In-Reply-To: <045b01c6154d$80d9f2b0$6402a8c0@foxbox> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 Subject: RE: Third party object support in ZE2 From: dmitry@zend.com ("Dmitry Stogov") References: <045b01c6154d$80d9f2b0$6402a8c0@foxbox> Hi Steph, > -----Original Message----- > From: Steph Fox [mailto:steph@zend.com] > Sent: Monday, January 09, 2006 9:50 PM > To: Dmitry Stogov > Cc: Andrei; internals > Subject: Third party object support in ZE2 > > > Hi Dmitry, > > I gave up on IM now, it's too slow :) > > Coming from the PHP-GTK project, we've noticed two areas where > ZEND_INTERNAL_CLASS is wrongly expected to adhere to > zend_object structure. > > The more important of the two stems from a change you made in > mid-November > in CVS_HEAD and PHP_5_1, forcing a call to > zend_objects_destroy_object() > when there is no obj->dtor defined. (zend_objects_API.c, > revision 1.47.2.3). Yes. This is my patch. It allws calling destructor in classes those extend internal ones. (Probably it can be reverted and all "bad" extensions should be fixed). > Reaching that function causes a crash in PHP-GTK 2 under some > circumstances. > Bug report open on this behaviour at http://bugs.php.net/35871. I reproduced this crash. The reason that "style_helper" is incompatible with "zend_object" and it hasn't pointer to class entry. I suggest to fix it on PHP-GTK level. I see two ways: 1) Make "style_helper" compatible with "zend_object". 2) Pass dumy dtor handler to zend_objects_store_put() (php_gtk++-types.c:382) > The second is that we can't guarantee third party objects will pass > zend_do_perform_implementation_check()... so if > display_startup_errors is > on, we get to know about it every time GTK+ objects break > PHP's inheritance > rules. Trivial patch attached appears to fix this minor > issue without > breaking anything currently in the test suite, but you might > know better. I didn't understand why we should allow to break inheritance rules? Right now we break rules only for "parent" internal functions without arg_info. I think this is enough. Why should we break ZE for "bad" extensions? May be I missed something? BTW: The patch has mistake: ZEND_INTERNAL_CLASS should be ZEND_INTERNAL_FUNCTION. Thanks. Dmitry. > - Steph > > > > > >