Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42497 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 50828 invoked from network); 5 Jan 2009 23:35:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jan 2009 23:35:48 -0000 Authentication-Results: pb1.pair.com smtp.mail=ilia@prohost.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ilia@prohost.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain prohost.org from 74.125.44.28 cause and error) X-PHP-List-Original-Sender: ilia@prohost.org X-Host-Fingerprint: 74.125.44.28 yx-out-2324.google.com Received: from [74.125.44.28] ([74.125.44.28:42826] helo=yx-out-2324.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E9/9B-07052-25992694 for ; Mon, 05 Jan 2009 18:35:47 -0500 Received: by yx-out-2324.google.com with SMTP id 3so3412369yxj.83 for ; Mon, 05 Jan 2009 15:35:44 -0800 (PST) Received: by 10.65.11.17 with SMTP id o17mr16159758qbi.4.1231198543850; Mon, 05 Jan 2009 15:35:43 -0800 (PST) Received: from ?192.168.1.111? (CPE0018f8c0ee69-CM000f9f7d6664.cpe.net.cable.rogers.com [72.138.241.182]) by mx.google.com with ESMTPS id k8sm40237939qba.5.2009.01.05.15.35.21 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 05 Jan 2009 15:35:21 -0800 (PST) Cc: Brian Shire , PHP Developers Mailing List Message-ID: To: Felipe Pena In-Reply-To: <1231187760.3220.2.camel@pena> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v930.3) Date: Mon, 5 Jan 2009 18:35:19 -0500 References: <495EF18A.7040206@php.net> <1230985623.3243.3.camel@pena> <1230985890.3243.6.camel@pena> <1230988421.3243.8.camel@pena> <495FBA65.4030001@php.net> <1231187760.3220.2.camel@pena> X-Mailer: Apple Mail (2.930.3) Subject: Re: [PHP-DEV] PATCH: bug #46701 From: ilia@prohost.org (Ilia Alshanetsky) The fix looks to be safe enough to MFH, I see no API breakage. On 5-Jan-09, at 3:36 PM, Felipe Pena wrote: > Hi, > > Em S=E1b, 2009-01-03 =E0s 11:20 -0800, shire escreveu: >> Felipe Pena wrote: >>> Em S=E1b, 2009-01-03 =E0s 10:31 -0200, Felipe Pena escreveu: >>>> Em S=E1b, 2009-01-03 =E0s 10:27 -0200, Felipe Pena escreveu: >>>>> Em Sex, 2009-01-02 =E0s 21:03 -0800, shire escreveu: >>>>>> I've created a patch for bug #46701 = (http://bugs.php.net/bug.php?id=3D46701=20 >>>>>> ) but it requires Zend changes, it can be found at the links =20 >>>>>> below for all branches. I've verified all tests pass. We may =20= >>>>>> want to verify it for other architectures due to the nature of =20= >>>>>> it being a float conversion problem, I tested on Intel OS X =20 >>>>>> 10.5.5. But this should at least be equivalent to =20 >>>>>> $array[intval($double)] now. >>>>>> >>>>>> >>>>>> http://tekrat.com/patches/bug46701.php6.patch >>>>>> http://tekrat.com/patches/bug46701.php53.patch >>>>>> http://tekrat.com/patches/bug46701.php52.patch >>>>>> >>>>>> >>>>> I suppose that should we also change the fetch (ZEND_FETCH_DIM_*)? >>>>> >>>>> And probably: >>>>> case IS_DOUBLE: >>>>> index =3D (long)Z_DVAL_P(dim); >>>>> goto num_index; >>>>> >>>>> And zend_execute.c (zend_fetch_dimension_address_inner) will be >>>>> superfluous with this change. >>>> Errr, I mean, the case IS_DOUBLE stuff in >>>> zend_fetch_dimension_address_inner will be superfluous. >>>> >>> >>> >>> In the end, I see that it requires the macro too, hehe. >>> So, a little change in your patch: >>> >>> - case IS_DOUBLE: >>> - index =3D (long)Z_DVAL_P(dim); >>> + case IS_DOUBLE: { >>> + DVAL_TO_LVAL(Z_DVAL_P(dim), index); >>> goto num_index; >>> - >>> + } >>> >> >> Hey, Good point Felipe, thanks! I've updated my patches as well =20 >> to include this change and verified all the tests. >> > > I've committed it in 5_3 and HEAD. Ilia, should it be in 5_2 too? > > Thanks for the patch, Shire. ;) > > --=20 > Regards, > Felipe Pena > Ilia Alshanetsky