Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87198 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 12531 invoked from network); 16 Jul 2015 11:27:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Jul 2015 11:27:42 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@beccati.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=php@beccati.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain beccati.com designates 176.9.114.167 as permitted sender) X-PHP-List-Original-Sender: php@beccati.com X-Host-Fingerprint: 176.9.114.167 spritz.beccati.com Received: from [176.9.114.167] ([176.9.114.167:53480] helo=mail.beccati.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D9/E1-32891-C2597A55 for ; Thu, 16 Jul 2015 07:27:42 -0400 Received: (qmail 10788 invoked from network); 16 Jul 2015 11:27:36 -0000 Received: from home.beccati.com (HELO ?192.168.1.202?) (88.149.176.119) by mail.beccati.com with SMTP; 16 Jul 2015 11:27:36 -0000 Message-ID: <55A794EF.10202@beccati.com> Date: Thu, 16 Jul 2015 13:26:39 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Christopher Jones , PHP Internals CC: pdo@lists.php.net References: <55A705F8.6010404@oracle.com> In-Reply-To: <55A705F8.6010404@oracle.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Reordering PDO statement dtor sequence? From: php@beccati.com (Matteo Beccati) Hi cjones, I've tried runinng the pdo_pgsql tests but I'm getting a (potentially unrelated) failure. I'll try to investigate and run the tests for other extensions as soon as I can find some time. Cheers On 16/07/2015 03:16, Christopher Jones wrote: > > We are looking at reordering the PDO statement-free dtors to fix a > resource leak in PDO_OCI. Let me know if this will affect other > drivers. > > Chris > > > *** pdo_stmt.c.orig 2015-07-15 09:56:18.986187123 -0700 > --- pdo_stmt.c 2015-07-15 09:57:22.292453715 -0700 > *************** > *** 2300,2305 **** > --- 2300,2309 ---- > > PDO_API void php_pdo_free_statement(pdo_stmt_t *stmt) > { > + > + if (stmt->methods && stmt->methods->dtor) { > + stmt->methods->dtor(stmt); > + } > if (stmt->bound_params) { > zend_hash_destroy(stmt->bound_params); > FREE_HASHTABLE(stmt->bound_params); > *************** > *** 2316,2324 **** > stmt->bound_columns = NULL; > } > > - if (stmt->methods && stmt->methods->dtor) { > - stmt->methods->dtor(stmt); > - } > if (stmt->query_string) { > efree(stmt->query_string); > } > --- 2320,2325 ---- > -- Matteo Beccati Development & Consulting - http://www.beccati.com/