Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:6598 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11250 invoked by uid 1010); 19 Dec 2003 13:49:36 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 11185 invoked from network); 19 Dec 2003 13:49:35 -0000 Received: from unknown (HELO mail.zend.com) (192.117.235.230) by pb1.pair.com with SMTP; 19 Dec 2003 13:49:35 -0000 Received: (qmail 24687 invoked from network); 19 Dec 2003 13:49:34 -0000 Received: from guardian.zend.office (HELO andi-laptop.zend.com) (10.1.1.4) by int.zend.com with SMTP; 19 Dec 2003 13:49:34 -0000 Message-ID: <5.1.0.14.2.20031219154836.02fc5a50@127.0.0.1> X-Sender: andi@127.0.0.1 X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Fri, 19 Dec 2003 15:49:25 +0200 To: "Rob Richards" , In-Reply-To: <079301c3c625$75e8b360$f7dea8c0@cyberware.local> References: <20031218124303.18e22274.paj@pearfr.org> <20031218124303.18e22274.paj@pearfr.org> <5.1.0.14.2.20031218201056.07660648@localhost> <3FE22229.9010209@phpbar.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] B3, pear segfault From: andi@zend.com (Andi Gutmans) At 06:44 AM 12/19/2003 -0500, Rob Richards wrote: >Did the problem end up being due to zend_execute.c 1.566 patch? > >Within the zend_assign_to_object function, the temp variable needs to be >free'd, otherwise it needs to be handled within the extensions themselves. >Not sure about the other functions in that patch as I only ran into issues >with this function so far in some of the extensions. > >ex. > >$dom=new domDocument(); >$dom->preserveWhiteSpace=false; <- leaks > >$array = simplexml_load_string('sample data'); >$array->data = false; <- leaks and is valid syntax as it gets converted to >string > >Within dom (pre 1.566 patch) , I had been handling this in my property write >function (removed the other day) via: >if (! PZVAL_IS_REF(value) && value->refcount == 0) { > value->refcount++; > zval_ptr_dtor(&value); >} > >Does this need to go back in or is the code from the 1.566 patch going to be >revisited and re-implemented? We're going to have to revisit this problem for RC1. It definitely needs solving. Right now I suggest you don't put the hack back into DOM and we'll try and fix and well define the rules of how to return values and with what reference count. Andi