Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32529 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82629 invoked by uid 1010); 1 Oct 2007 23:28:53 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 82614 invoked from network); 1 Oct 2007 23:28:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Oct 2007 23:28:53 -0000 X-Host-Fingerprint: 84.150.104.32 p54966820.dip.t-dialin.net Date: Mon, 01 Oct 2007 19:28:53 -0400 Received: from [84.150.104.32] ([84.150.104.32:23691] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0D/2A-20520-4B281074 for ; Mon, 01 Oct 2007 19:28:53 -0400 Message-ID: <0D.2A.20520.4B281074@pb1.pair.com> To: internals@lists.php.net User-Agent: pan 0.120 (Plate of Shrimp) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Posted-By: 84.150.104.32 Subject: [PATCH] bug 42818 From: dsp@php.net (David Soria Parra) Hi internals, another small patch. This time concerning http://bugs.php.net/bug.php?id=42818. As I'm not a ZendEngine expert I'm not sure if this is the right place and the right way to fix the bug, but at least for me this small fix works fine. Maybe somebody who is really into depth with the engine can use it as a small hint. The problem is that in ZEND_INIT_ARRAY_SPEC_UNUSED_UNUSED_HANDLER the op code tmp_var is initialized but never freed by the clone op handler. patch is against PHP_5_3 greets david Index: zend_vm_execute.h =================================================================== RCS file: /repository/ZendEngine2/zend_vm_execute.h,v retrieving revision 1.62.2.30.2.49.2.5 diff -u -r1.62.2.30.2.49.2.5 zend_vm_execute.h --- zend_vm_execute.h 1 Oct 2007 10:37:13 -0000 1.62.2.30.2.49.2.5 +++ zend_vm_execute.h 1 Oct 2007 23:24:33 -0000 @@ -4661,7 +4661,9 @@ zend_error(E_WARNING, "__clone method called on non-object"); EX_T(opline->result.u.var).var.ptr = EG(error_zval_ptr); EX_T(opline->result.u.var).var.ptr->refcount++; - + if (obj) { + zval_dtor(obj); + } ZEND_VM_NEXT_OPCODE(); }