Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73441 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89551 invoked from network); 26 Mar 2014 04:56:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Mar 2014 04:56:16 -0000 Authentication-Results: pb1.pair.com smtp.mail=tjerk.meesters@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tjerk.meesters@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.175 as permitted sender) X-PHP-List-Original-Sender: tjerk.meesters@gmail.com X-Host-Fingerprint: 209.85.220.175 mail-vc0-f175.google.com Received: from [209.85.220.175] ([209.85.220.175:48332] helo=mail-vc0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C2/92-07356-9ED52335 for ; Tue, 25 Mar 2014 23:56:14 -0500 Received: by mail-vc0-f175.google.com with SMTP id lh14so1760891vcb.34 for ; Tue, 25 Mar 2014 21:56:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ZzuE/can4pD6eE40FgzVkm2ryz+hyQjwB3+Em+Redfw=; b=mCcqyo33xZ8t+/wb5cMbZtf2E+93yRkT+2MJ/mwQJ23W1hpgzEy5x5KBSwQqN9a/VV Wa/E7lry4Dn8uKJGZGDkhV+3oTxuE97gQFgM/Nr4K49p7uVToay/KH1iEMLWMumk420d KcmFkP6GHm8MzoYxQENNBlRKa7oZIJov8/y4k5yTJ8dZzUT0h0OgbtDQ1+iRzas6xpoN HZbxFf8Wj7HDb5zsIbkXqSXdkXxD4wVQTmGBCYvAcjd5BH1qG/AvFHtUhmpBAcfEayPc eTZoYFlKssVVeG7GE68uddXO9BRZm4BzDxve7x8cznTxR8R/alBiHYmlaUsaKUHDqfET vrRQ== MIME-Version: 1.0 X-Received: by 10.52.175.166 with SMTP id cb6mr49243670vdc.1.1395809766928; Tue, 25 Mar 2014 21:56:06 -0700 (PDT) Received: by 10.58.55.131 with HTTP; Tue, 25 Mar 2014 21:56:06 -0700 (PDT) In-Reply-To: References: <532A3E88.20202@sugarcrm.com> <532A418A.8020607@sugarcrm.com> <532B4A1B.5090503@sugarcrm.com> <532B6581.6030801@sugarcrm.com> <532B91AF.7090804@sugarcrm.com> <5330F929.3080000@sugarcrm.com> <5330FDF7.1040904@sugarcrm.com> Date: Wed, 26 Mar 2014 12:56:06 +0800 Message-ID: To: Levi Morrison Cc: Stas Malyshev , Etienne Kneuss , PHP Internals Content-Type: multipart/alternative; boundary=bcaec50fdff354f6c304f57b4975 Subject: Re: [PHP-DEV] Merge PR 621 From: tjerk.meesters@gmail.com (Tjerk Meesters) --bcaec50fdff354f6c304f57b4975 Content-Type: text/plain; charset=ISO-8859-1 On Wed, Mar 26, 2014 at 12:14 PM, Tjerk Meesters wrote: > Hi Levi, > > On Tue, Mar 25, 2014 at 9:51 PM, Levi Morrison wrote: > >> In a similar vein have we checked `offsetSet`? It seems `offsetSet` is >> not called with `+=`; I am not sure if this is intended; see >> https://bugs.php.net/bug.php?id=66641 >> > > This is due to how binary assignment is applied to properties vs arrays: > > http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_vm_execute.h#31979 > > The workaround here is to disable the `get_property_ptr_ptr` inside > `spl_array.c`, like this: > > https://gist.github.com/datibbaw/703597322ad411287461 > The test suite proved me wrong about this, as bug65328.phpt fails and causes some memory leaks when applied; some tweaks may be required or an altogether different approach :) > > > Not sure if everyone will agree to that change, but it's one way to fix > the bug other than changing the API itself :) > > >> >> >> On Tue, Mar 25, 2014 at 4:38 AM, Tjerk Meesters > > wrote: >> >>> Hi, >>> >>> >>> On Tue, Mar 25, 2014 at 11:54 AM, Stas Malyshev >> >wrote: >>> >>> > Hi! >>> > >>> > > It's my understanding that you should (have to) only call "get" if >>> you >>> > > know that the offset exists. >>> > >>> > Yes, you are right. I'd still add some example that changes the keys to >>> > the tests to ensure all cases are covered properly. But looks like it >>> > works OK in all cases I could think of. >>> > >>> >>> I've updated the test case with such an example. >>> >>> PHP-5.6 and master have been updated. >>> >>> >>> >>> > -- >>> > Stanislav Malyshev, Software Architect >>> > SugarCRM: http://www.sugarcrm.com/ >>> > (408)454-6900 ext. 227 >>> > >>> >>> >>> >>> -- >>> -- >>> Tjerk >>> >> >> > > > -- > -- > Tjerk > -- -- Tjerk --bcaec50fdff354f6c304f57b4975--