Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:28202 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25985 invoked by uid 1010); 2 Mar 2007 16:47:53 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 25970 invoked from network); 2 Mar 2007 16:47:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Mar 2007 16:47:53 -0000 Authentication-Results: pb1.pair.com header.from=frank@kromann.info; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=frank@kromann.info; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain kromann.info designates 64.186.239.125 as permitted sender) X-PHP-List-Original-Sender: frank@kromann.info X-Host-Fingerprint: 64.186.239.125 c-064-186-239-125.oc1.redwire.net Linux 2.5 (sometimes 2.4) (4) Received: from [64.186.239.125] ([64.186.239.125:40572] helo=mail.kromann.info) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0A/52-04700-73558E54 for ; Fri, 02 Mar 2007 11:47:52 -0500 Received: by mail.kromann.info (Postfix, from userid 510) id A0D784040CB; Fri, 2 Mar 2007 08:47:48 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on mail.kromann.info X-Spam-Level: X-Spam-Status: No, score=0.9 required=4.0 tests=AWL autolearn=ham version=3.1.7 Received: from warp (www.kromann.info [64.186.239.115]) by mail.kromann.info (Postfix) with SMTP id CBD1F4040C9; Fri, 2 Mar 2007 08:47:47 -0800 (PST) To: Andy Wharmby Cc: Wez Furlong , PHP internals list X-Mailer: Swwwing 2000 Message-ID: <11728540521160000@9866357972520000.9866341568840000> MIME-Version: 1.0 Reply-To: "Frank M. Kromann" Date: Fri, 02 Mar 2007 08:47:32 -0800 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Subject: Re: COM extension defects: Patch for defect 35872 From: frank@kromann.info ("Frank M. Kromann") Hi ANdy, Looks good to me. Nice and clean. - Frank > Hi Internals, > Below are details of a suggested patch for COM extension defect > 35872 (http://bugs.php.net/bug.php?id=35872) for review/approval. > All comments welcome; good or bad. > > Regards > Andy > > Andy Wharmby > IBM United Kingdom Limited > Winchester, England SO21 2JN > E-mail: andy_wharmby@uk.ibm.com > > Using supplied testcase the backtrace is as follows: > > php6ts_debug.dll!zend_object_store_get_object(_zval_struct * > zobject=0x009c19e8, void * * * tsrm_ls=0x009659a8) Line 263 + 0x1b C > php6ts_debug.dll!zend_objects_get_address(_zval_struct * > zobject=0x009c19e8, void * * * tsrm_ls=0x009659a8) Line 144 + 0xd C > php6ts_debug.dll!zend_std_object_get_class(_zval_struct * > object=0x009c19e8, void * * * tsrm_ls=0x009659a8) Line 1074 + 0xd C > php6ts_debug.dll!zend_get_class_entry(_zval_struct * > zobject=0x009c19e8, void * * * tsrm_ls=0x009659a8) Line 239 + 0x13 C > php6ts_debug.dll!disp_destructor(php_dispatchex * disp=0x00194460) > Line 562 + 0x10 C > php6ts_debug.dll!dispatch_dtor(_zend_rsrc_list_entry * > rsrc=0x009c3230, void * * * tsrm_ls=0x009659a8) Line 60 + 0x9 C > php6ts_debug.dll!list_entry_destructor(void * ptr=0x009c3230) Line > 184 + 0x10 C > php6ts_debug.dll!zend_hash_apply_deleter(_hashtable * > ht=0x00968290, bucket * p=0x009c31d8) Line 836 + 0xf C > php6ts_debug.dll!zend_hash_graceful_reverse_destroy(_hashtable * > ht=0x00968290) Line 871 + 0xd C > php6ts_debug.dll!zend_destroy_rsrc_list(_hashtable * ht=0x00968290, > void * * * tsrm_ls=0x009659a8) Line 240 + 0x9 C > php6ts_debug.dll!zend_deactivate(void * * * tsrm_ls=0x009659a8) > Line 1358 + 0x1e C > php6ts_debug.dll!php_request_shutdown(void * dummy=0x00000000) > Line 1429 + 0x9 C > php.exe!main(int argc=0x00000003, char * * argv=0x009658f8) Line > 1306 + 0xa C > php.exe!mainCRTStartup() Line 398 + 0x11 C > > We fail in zend_object_store_get_object() after the objects store has > been destroyed earlier in request shutdown by zend_objects_store_destroy(). > Which is very similar to defect 34617 > (http://bugs.php.net/bug.php?id=34617). > > The reference to the object store is caused by the trace() call in > disp_destructor(). This call to trace() should probably be a NOOP in a > non-debug build > but we still need to fix reported problem so DEBUG builds don't hit the > problem. I will raise a separate defect to disable the trace calls in > non-DEBUG builds. > > I have resolved the problem reported under defect 35872 by defining a > new boolean flag "rshutdown_started" in COMG which is set to false by > COM RINIT > routine and true by the COM RSHUTDOWN routine. This allows the COM code > to avoid reference to the object store if invoked during request shutdown. > The trace calls themselves have been modified to add the object address > to allow entries referring to the same object to be correlated even if > the object name is not > available. > > Fixing code in disp_destructor revealed a similar issue in FETCH_DISP > macro which is fixed in a same way. > > The full patch; built against CVS HEAD is attached. > >