Re: B3, pear segfault
| From: | Andi Gutmans | Date: | Fri, 19 Dec 2003 13:49:25 +0000 |
| Subject: | Re: B3, pear segfault | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-6598@lists.php.net to get a copy of this message | ||
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('<array><data>sample data</data></array>'); $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